From 31d794be59cb2d1bf264df79f471b0c8d5f5a457 Mon Sep 17 00:00:00 2001 From: lresende Date: Sat, 21 Nov 2009 07:40:26 +0000 Subject: Moving to site trunk git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@882841 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/core/scope/AbstractScopeContainer.html | 868 +++++++++++++++++++++ 1 file changed, 868 insertions(+) create mode 100644 site/trunk/site-publish/doc/javadoc/java-sca-1.4/org/apache/tuscany/sca/core/scope/AbstractScopeContainer.html (limited to 'site/trunk/site-publish/doc/javadoc/java-sca-1.4/org/apache/tuscany/sca/core/scope/AbstractScopeContainer.html') diff --git a/site/trunk/site-publish/doc/javadoc/java-sca-1.4/org/apache/tuscany/sca/core/scope/AbstractScopeContainer.html b/site/trunk/site-publish/doc/javadoc/java-sca-1.4/org/apache/tuscany/sca/core/scope/AbstractScopeContainer.html new file mode 100644 index 0000000000..cb1100d616 --- /dev/null +++ b/site/trunk/site-publish/doc/javadoc/java-sca-1.4/org/apache/tuscany/sca/core/scope/AbstractScopeContainer.html @@ -0,0 +1,868 @@ + + + + + + +AbstractScopeContainer + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.apache.tuscany.sca.core.scope +
+Class AbstractScopeContainer<KEY>

+
+java.lang.Object
+  extended by org.apache.tuscany.sca.core.scope.AbstractScopeContainer<KEY>
+
+
+
All Implemented Interfaces:
java.util.EventListener, ScopeContainer<KEY>, RuntimeEventListener
+
+
+
Direct Known Subclasses:
CompositeScopeContainer, ConversationalScopeContainer, HttpSessionScopeContainer, RequestScopeContainer, StatelessScopeContainer
+
+
+
+
public abstract class AbstractScopeContainer<KEY>
extends java.lang.Object
implements ScopeContainer<KEY>
+ + +

+Implements functionality common to scope contexts. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+protected  RuntimeComponentcomponent + +
+           
+protected  intlifecycleState + +
+           
+protected  Scopescope + +
+           
+protected  java.util.Map<KEY,InstanceWrapper<?>>wrappers + +
+           
+ + + + + + + +
Fields inherited from interface org.apache.tuscany.sca.core.scope.ScopeContainer
CONFIG_ERROR, ERROR, INITIALIZED, INITIALIZING, RUNNING, STOPPED, STOPPING, UNINITIALIZED
+  + + + + + + + + + + +
+Constructor Summary
AbstractScopeContainer(Scope scope, + RuntimeComponent component) + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidaddWrapperReference(KEY existingContextId, + KEY newContextId) + +
+          Allows a component to be registered against more than one context id.
+protected  voidcheckInit() + +
+           
+protected  InstanceWrappercreateInstanceWrapper() + +
+          Creates a new physical instance of a component, wrapped in an + InstanceWrapper.
+ InstanceWrappergetAssociatedWrapper(KEY contextId) + +
+          Returns an implementation instance associated with the current scope context.
+ RuntimeComponentgetComponent() + +
+           
+ intgetLifecycleState() + +
+          Returns the lifecycle state
+ ScopegetScope() + +
+          Returns the Scope that this container supports.
+ InstanceWrappergetWrapper(KEY contextId) + +
+          Returns an instance wrapper associated with the current scope context, creating one if necessary
+protected  booleanisEagerInit() + +
+           
+ voidonEvent(Event event) + +
+          Accepts and event and acts on it
+ voidregisterWrapper(InstanceWrapper wrapper, + KEY contextId) + +
+          Register an existing instance against a context id.
+ voidremove(KEY contextId) + +
+          Default implementation of remove which does nothing
+ voidreturnWrapper(InstanceWrapper wrapper, + KEY contextId) + +
+          Return a wrapper after use (for example, after invoking the instance).
+ voidsetComponent(RuntimeComponent component) + +
+           
+protected  voidsetLifecycleState(int lifecycleState) + +
+          Set the current state of the Lifecycle.
+ voidstart() + +
+          Starts the Lifecycle.
+ voidstartContext(KEY contextId) + +
+          Start a new context with the supplied ID.
+ voidstop() + +
+          Stops the Lifecycle.
+ voidstopContext(KEY contextId) + +
+          Stop the context with the supplied ID.
+ java.lang.StringtoString() + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+wrappers

+
+protected java.util.Map<KEY,InstanceWrapper<?>> wrappers
+
+
+
+
+
+ +

+scope

+
+protected final Scope scope
+
+
+
+
+
+ +

+component

+
+protected RuntimeComponent component
+
+
+
+
+
+ +

+lifecycleState

+
+protected volatile int lifecycleState
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+AbstractScopeContainer

+
+public AbstractScopeContainer(Scope scope,
+                              RuntimeComponent component)
+
+
+ + + + + + + + +
+Method Detail
+ +

+checkInit

+
+protected void checkInit()
+
+
+
+
+
+
+
+
+
+ +

+createInstanceWrapper

+
+protected InstanceWrapper createInstanceWrapper()
+                                         throws TargetResolutionException
+
+
Creates a new physical instance of a component, wrapped in an + InstanceWrapper. +

+

+
+
+
+
Parameters:
component - the component whose instance should be created +
Returns:
a wrapped instance that has been injected but not yet started +
Throws: +
TargetResolutionException - if there was a problem creating the + instance
+
+
+
+ +

+getAssociatedWrapper

+
+public InstanceWrapper getAssociatedWrapper(KEY contextId)
+                                     throws TargetResolutionException
+
+
Description copied from interface: ScopeContainer
+
Returns an implementation instance associated with the current scope context. + If no instance is found, a TargetNotFoundException is thrown. +

+

+
Specified by:
getAssociatedWrapper in interface ScopeContainer<KEY>
+
+
+
Parameters:
contextId - the id for the scope context +
Returns:
the wrapper for the target instance +
Throws: +
TargetResolutionException - if there was a problem instantiating the target instance
+
+
+
+ +

+getScope

+
+public Scope getScope()
+
+
Description copied from interface: ScopeContainer
+
Returns the Scope that this container supports. +

+

+
Specified by:
getScope in interface ScopeContainer<KEY>
+
+
+ +
Returns:
the Scope that this container supports
+
+
+
+ +

+getWrapper

+
+public InstanceWrapper getWrapper(KEY contextId)
+                           throws TargetResolutionException
+
+
Description copied from interface: ScopeContainer
+
Returns an instance wrapper associated with the current scope context, creating one if necessary +

+

+
Specified by:
getWrapper in interface ScopeContainer<KEY>
+
+
+
Parameters:
contextId - the id for the scope context +
Returns:
the wrapper for the target instance +
Throws: +
TargetResolutionException - if there was a problem instantiating the target instance
+
+
+
+ +

+addWrapperReference

+
+public void addWrapperReference(KEY existingContextId,
+                                KEY newContextId)
+                         throws TargetResolutionException
+
+
Description copied from interface: ScopeContainer
+
Allows a component to be registered against more than one context id. This is required in the + case of stateful callbacks where we want to identify the originating client component instance + as the callback target but we don't want to reuse the clients original conversation id +

+

+
Specified by:
addWrapperReference in interface ScopeContainer<KEY>
+
+
+
Parameters:
existingContextId - an id that identifies an existing component instance
newContextId - a new id against which this component will also be registered +
Throws: +
TargetResolutionException
+
+
+
+ +

+registerWrapper

+
+public void registerWrapper(InstanceWrapper wrapper,
+                            KEY contextId)
+                     throws TargetResolutionException
+
+
Description copied from interface: ScopeContainer
+
Register an existing instance against a context id. This is needed + for a stateful callback where the service reference for the forward call + contains a callback object that is not a service reference. +

+

+
Specified by:
registerWrapper in interface ScopeContainer<KEY>
+
+
+
Parameters:
wrapper - the instance wrapper for the instance to be registered
contextId - the id for the scope context +
Throws: +
TargetResolutionException
+
+
+
+ +

+onEvent

+
+public void onEvent(Event event)
+
+
Description copied from interface: RuntimeEventListener
+
Accepts and event and acts on it +

+

+
Specified by:
onEvent in interface RuntimeEventListener
+
+
+
Parameters:
event - The event to act on
+
+
+
+ +

+isEagerInit

+
+protected boolean isEagerInit()
+
+
+
+
+
+
+
+
+
+ +

+returnWrapper

+
+public void returnWrapper(InstanceWrapper wrapper,
+                          KEY contextId)
+                   throws TargetDestructionException
+
+
Description copied from interface: ScopeContainer
+
Return a wrapper after use (for example, after invoking the instance). +

+

+
Specified by:
returnWrapper in interface ScopeContainer<KEY>
+
+
+
Parameters:
wrapper - the wrapper for the target instance being returned
contextId - the id for the scope context +
Throws: +
TargetDestructionException - if there was a problem returning the target instance
+
+
+
+ +

+remove

+
+public void remove(KEY contextId)
+            throws TargetDestructionException
+
+
Default implementation of remove which does nothing +

+

+
Specified by:
remove in interface ScopeContainer<KEY>
+
+
+
Parameters:
contextId - the identifier of the context to remove. +
Throws: +
TargetDestructionException
+
+
+
+ +

+start

+
+public void start()
+
+
Description copied from interface: ScopeContainer
+
Starts the Lifecycle. +

+

+
Specified by:
start in interface ScopeContainer<KEY>
+
+
+
+
+
+
+ +

+startContext

+
+public void startContext(KEY contextId)
+
+
Description copied from interface: ScopeContainer
+
Start a new context with the supplied ID. +

+

+
Specified by:
startContext in interface ScopeContainer<KEY>
+
+
+
Parameters:
contextId - an ID that uniquely identifies the context.
+
+
+
+ +

+stop

+
+public void stop()
+
+
Description copied from interface: ScopeContainer
+
Stops the Lifecycle. +

+

+
Specified by:
stop in interface ScopeContainer<KEY>
+
+
+
+
+
+
+ +

+stopContext

+
+public void stopContext(KEY contextId)
+
+
Description copied from interface: ScopeContainer
+
Stop the context with the supplied ID. +

+

+
Specified by:
stopContext in interface ScopeContainer<KEY>
+
+
+
Parameters:
contextId - an ID that uniquely identifies the context.
+
+
+
+ +

+toString

+
+public java.lang.String toString()
+
+
+
Overrides:
toString in class java.lang.Object
+
+
+
+
+
+
+ +

+getComponent

+
+public RuntimeComponent getComponent()
+
+
+
+
+
+
+
+
+
+ +

+setComponent

+
+public void setComponent(RuntimeComponent component)
+
+
+
+
+
+
+
+
+
+ +

+getLifecycleState

+
+public int getLifecycleState()
+
+
Description copied from interface: ScopeContainer
+
Returns the lifecycle state +

+

+
Specified by:
getLifecycleState in interface ScopeContainer<KEY>
+
+
+
See Also:
ScopeContainer.UNINITIALIZED, +ScopeContainer.INITIALIZING, +ScopeContainer.INITIALIZED, +ScopeContainer.RUNNING, +ScopeContainer.STOPPING, +ScopeContainer.STOPPED
+
+
+
+ +

+setLifecycleState

+
+protected void setLifecycleState(int lifecycleState)
+
+
Set the current state of the Lifecycle. +

+

+
+
+
+
Parameters:
lifecycleState - the new state
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + -- cgit v1.2.3