com.google.code.rees.scope.conversation.context
Interface ConversationContextManager

All Superinterfaces:
Serializable
All Known Implementing Classes:
DefaultConversationContextManager, TimeoutConversationContextManager

public interface ConversationContextManager
extends Serializable

Uses a ConversationContextFactory to manage the creation, caching, retrieval, removal, and expiration of conversations

Author:
rees.byars

Method Summary
 ConversationContext createContext(String conversationName, long maxIdleTimeMillis)
          Creates a new context for the given conversation name, using the given idle time
 void destroy()
          Cleanup and release the manager's resources
 ConversationContext getContext(String conversationName, String conversationId)
          Retrieve the context identified by the given information, creating a new one if none exists.
 ConversationContext remove(String conversationName, String conversationId)
          Remove the context identified by the given information, returning the context being removed
 void setContextFactory(ConversationContextFactory contextFactory)
          Set the ConversationContextFactory to be used by this manager
 void setMaxInstances(int maxInstances)
          Set the max number of cached ConversationContexts.
 

Method Detail

setMaxInstances

void setMaxInstances(int maxInstances)
Set the max number of cached ConversationContexts.

Parameters:
maxInstances -

setContextFactory

void setContextFactory(ConversationContextFactory contextFactory)
Set the ConversationContextFactory to be used by this manager

Parameters:
contextFactory -

createContext

ConversationContext createContext(String conversationName,
                                  long maxIdleTimeMillis)
Creates a new context for the given conversation name, using the given idle time

Parameters:
conversationName -
maxIdleTimeMillis -
Returns:

getContext

ConversationContext getContext(String conversationName,
                               String conversationId)
Retrieve the context identified by the given information, creating a new one if none exists.

Parameters:
conversationName -
conversationId -
Returns:

remove

ConversationContext remove(String conversationName,
                           String conversationId)
Remove the context identified by the given information, returning the context being removed

Parameters:
conversationName -
conversationId -
Returns:

destroy

void destroy()
Cleanup and release the manager's resources



Copyright © 2012-2013. All Rights Reserved.