public interface ContextManager
ContextManager contextManager = new SimpleContextManager();
Context context = contextManager.getContext();
...
| Modifier and Type | Method and Description |
|---|---|
void |
addToContextsToDestroy(String contextId)
Schedule a context for destruction after the next remote call
|
void |
destroyContext(String contextId)
Destroy a context
|
void |
destroyContexts()
Destroy all contexts
|
void |
destroyFinishedContexts()
Destroy finished contexts and reset current pending contexts
|
List<Context> |
getAllContexts()
Get a list of all conversation contexts
|
Context |
getContext()
Get the global context
|
Context |
getContext(String contextId)
Get the context from its id
|
Context |
getContext(String contextId,
String parentContextId,
boolean create)
Get a context from its id with the specified parent id, and create it if it does not exist
|
Context |
newContext(String contextId,
String parentContextId)
Create a context with the specified id and parent id if it does not exist
|
void |
removeFromContextsToDestroy(String contextId)
Deschedule destruction of context
|
Context |
retrieveContext(Context sourceContext,
String contextId,
boolean wasConversationCreated,
boolean wasConversationEnded)
Get or create the context for the specified context id and server conversation flags
|
void |
updateContextId(String previousContextId,
Context context)
Update the context id for an existing context
|
Context getContext()
Context getContext(String contextId)
contextId - context idContext getContext(String contextId, String parentContextId, boolean create)
contextId - context idparentContextId - parent context idcreate - if true, create a context if not existContext newContext(String contextId, String parentContextId)
contextId - context idparentContextId - parent context idContext retrieveContext(Context sourceContext, 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(String previousContextId, Context context)
previousContextId - previous context idcontext - context to updatevoid destroyContext(String contextId)
contextId - context idList<Context> getAllContexts()
void destroyContexts()
void destroyFinishedContexts()
void addToContextsToDestroy(String contextId)
contextId - context idvoid removeFromContextsToDestroy(String contextId)
contextId - context id