001/*
002 * Copyright (c) 2013 Nu Echo Inc. All rights reserved.
003 */
004
005package com.nuecho.rivr.core.servlet;
006
007import javax.servlet.http.*;
008
009import org.slf4j.*;
010
011import com.nuecho.rivr.core.channel.*;
012import com.nuecho.rivr.core.dialogue.*;
013
014/**
015 * Creates {@link DialogueContext} based on the {@link HttpServletRequest HTTP
016 * request}, the dialogue ID and the {@link DialogueChannel}.
017 * 
018 * @param <O> type of {@link OutputTurn}
019 * @param <I> type of {@link InputTurn}
020 * @param <C> type of {@link DialogueContext}
021 * @author Nu Echo Inc.
022 */
023public interface DialogueContextFactory<C extends DialogueContext<I, O>, I extends InputTurn, O extends OutputTurn> {
024    C createDialogueContext(HttpServletRequest request,
025                            String dialogueId,
026                            DialogueChannel<I, O> dialogueChannel,
027                            Logger logger);
028}