public interface ContextManager
ContextManager contextManager = new SimpleContextManager();
Context context = contextManager.getContext();
...
| Modifier and Type | Method and Description |
|---|---|
void |
addToContextsToDestroy(java.lang.String contextId)
Schedule a context for destruction after the next remote call
|
void |
destroyContext(java.lang.String contextId)
Destroy a context
|
void |
destroyContexts()
Destroy all contexts
|
void |
destroyFinishedContexts()
Destroy finished contexts and reset current pending contexts
|
java.util.List<Context> |
getAllContexts()
Get a list of all conversation contexts
|
Context |
getContext()
Get the global context
|
Context |
getContext(java.lang.String contextId)
Get the context from its id
|
Context |
getContext(java.lang.String contextId,
java.lang.String parentContextId,
boolean create)
Get a context from its id with the specified parent id, and create it if it does not exist
|
boolean |
isGlobal(Context context)
True if context is global context
|
Context |
newContext(java.lang.String contextId,
java.lang.String parentContextId)
Create a context with the specified id and parent id if it does not exist
|
void |
removeFromContextsToDestroy(java.lang.String contextId)
Deschedule destruction of context
|
Context |
retrieveContext(Context sourceContext,
java.lang.String contextId,
boolean wasConversationCreated,
boolean wasConversationEnded)
Get or create the context for the specified context id and server conversation flags
|
void |
updateContextId(java.lang.String previousContextId,
Context context)
Update the context id for an existing context
|
Context getContext()
Context getContext(java.lang.String contextId)
contextId - context idContext getContext(java.lang.String contextId, java.lang.String parentContextId, boolean create)
contextId - context idparentContextId - parent context idcreate - if true, create a context if not existContext newContext(java.lang.String contextId, java.lang.String parentContextId)
contextId - context idparentContextId - parent context idboolean isGlobal(Context context)
context - contextContext retrieveContext(Context sourceContext, java.lang.String contextId, boolean wasConversationCreated, boolean wasConversationEnded)
sourceContext - source contextcontextId - conversation context idwasConversationCreated - true if the conversation was just created by the last request on the serverwasConversationEnded - true if the conversation was just ended by the last request on the servervoid updateContextId(java.lang.String previousContextId,
Context context)
previousContextId - previous context idcontext - context to updatevoid destroyContext(java.lang.String contextId)
contextId - context idjava.util.List<Context> getAllContexts()
void destroyContexts()
void destroyFinishedContexts()
void addToContextsToDestroy(java.lang.String contextId)
contextId - context idvoid removeFromContextsToDestroy(java.lang.String contextId)
contextId - context id