|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tuscany.sca.core.scope.AbstractScopeContainer<java.lang.Object>
org.apache.tuscany.sca.core.scope.ConversationalScopeContainer
public class ConversationalScopeContainer
A scope context which manages atomic component instances keyed on ConversationID
| Field Summary |
|---|
| Fields inherited from class org.apache.tuscany.sca.core.scope.AbstractScopeContainer |
|---|
component, lifecycleState, scope, wrappers |
| Fields inherited from interface org.apache.tuscany.sca.core.scope.ScopeContainer |
|---|
CONFIG_ERROR, ERROR, INITIALIZED, INITIALIZING, RUNNING, STOPPED, STOPPING, UNINITIALIZED |
| Constructor Summary | |
|---|---|
ConversationalScopeContainer(Store aStore,
RuntimeComponent component)
|
|
| Method Summary | |
|---|---|
void |
addWrapperReference(java.lang.Object existingContextId,
java.lang.Object contextId)
This method allows a new context id to be registered alongside an existing one. |
void |
conversationEnded(ExtendedConversation conversation)
The conversation is ended |
void |
conversationExpired(ExtendedConversation conversation)
The conversation is expired |
void |
conversationStarted(ExtendedConversation conversation)
The conversation is started |
ConversationManager |
getConversationManager()
|
protected InstanceWrapper |
getInstanceWrapper(boolean create,
java.lang.Object contextId)
|
InstanceWrapper |
getWrapper(java.lang.Object contextId)
Returns an instance wrapper associated with the current scope context, creating one if necessary |
void |
registerWrapper(InstanceWrapper wrapper,
java.lang.Object contextId)
Register an existing instance against a context id. |
void |
remove(java.lang.Object contextId)
Default implementation of remove which does nothing |
void |
setConversationManager(ConversationManager conversationManager)
|
| Methods inherited from class org.apache.tuscany.sca.core.scope.AbstractScopeContainer |
|---|
checkInit, createInstanceWrapper, getAssociatedWrapper, getComponent, getLifecycleState, getScope, isEagerInit, onEvent, returnWrapper, setComponent, setLifecycleState, start, startContext, stop, stopContext, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConversationalScopeContainer(Store aStore,
RuntimeComponent component)
| Method Detail |
|---|
protected InstanceWrapper getInstanceWrapper(boolean create,
java.lang.Object contextId)
throws TargetResolutionException
TargetResolutionException
public InstanceWrapper getWrapper(java.lang.Object contextId)
throws TargetResolutionException
ScopeContainer
getWrapper in interface ScopeContainer<java.lang.Object>getWrapper in class AbstractScopeContainer<java.lang.Object>contextId - the id for the scope context
TargetResolutionException - if there was a problem instantiating the target instance
public void addWrapperReference(java.lang.Object existingContextId,
java.lang.Object contextId)
throws TargetResolutionException
addWrapperReference in interface ScopeContainer<java.lang.Object>addWrapperReference in class AbstractScopeContainer<java.lang.Object>existingContextId - the context id against which the component is already registeredcontext - this should be a conversation object so that the conversation can b stored
and reset when the component instance is removed
TargetResolutionException
public void registerWrapper(InstanceWrapper wrapper,
java.lang.Object contextId)
throws TargetResolutionException
ScopeContainer
registerWrapper in interface ScopeContainer<java.lang.Object>registerWrapper in class AbstractScopeContainer<java.lang.Object>wrapper - the instance wrapper for the instance to be registeredcontextId - the id for the scope context
TargetResolutionException
public void remove(java.lang.Object contextId)
throws TargetDestructionException
AbstractScopeContainer
remove in interface ScopeContainer<java.lang.Object>remove in class AbstractScopeContainer<java.lang.Object>contextId - the identifier of the context to remove.
TargetDestructionExceptionpublic void conversationEnded(ExtendedConversation conversation)
ConversationListener
conversationEnded in interface ConversationListenerConversationListener.conversationEnded(org.apache.tuscany.sca.core.conversation.ExtendedConversation)public void conversationExpired(ExtendedConversation conversation)
ConversationListener
conversationExpired in interface ConversationListenerConversationListener.conversationExpired(org.apache.tuscany.sca.core.conversation.ExtendedConversation)public void conversationStarted(ExtendedConversation conversation)
ConversationListener
conversationStarted in interface ConversationListenerConversationListener.conversationStarted(org.apache.tuscany.sca.core.conversation.ExtendedConversation)public ConversationManager getConversationManager()
public void setConversationManager(ConversationManager conversationManager)
conversationManager - the conversationManager to set
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||