|
Tuscany Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ScopeContext
Manages the lifecycle and visibility of Context
s.
Context
Field Summary |
---|
Fields inherited from interface org.apache.tuscany.core.context.Lifecycle |
---|
CONFIG_ERROR, ERROR, INITIALIZED, INITIALIZING, RUNNING, STARTED, STOPPED, STOPPING, UNINITIALIZED |
Method Summary | |
---|---|
Context |
getContext(java.lang.String name)
Returns a context bound to the given name or null if the component does not exist. |
Context |
getContextByKey(java.lang.String name,
java.lang.Object key)
Returns a context bound to the given name and scoped to the given key or null if the context does not exist |
java.lang.Object |
getInstance(QualifiedName qName)
|
boolean |
isCacheable()
Returns whether implementation instances may be held for the duration of an wire |
void |
registerFactories(java.util.List<ContextFactory<Context>> configurations)
Registers the context factory used to construct instance contexts for the scope |
void |
registerFactory(ContextFactory<Context> configuration)
Adds a context factory to the scope |
void |
removeContext(java.lang.String name)
Removes a context with the given name, determining the scope key from the thread context |
void |
removeContextByKey(java.lang.String name,
java.lang.Object key)
Removes a context bound to the given name and scope key |
Methods inherited from interface org.apache.tuscany.core.context.Lifecycle |
---|
getLifecycleState, getName, setName, start, stop |
Methods inherited from interface org.apache.tuscany.core.context.RuntimeEventListener |
---|
onEvent |
Method Detail |
---|
java.lang.Object getInstance(QualifiedName qName) throws TargetException
TargetException
boolean isCacheable()
void registerFactories(java.util.List<ContextFactory<Context>> configurations)
void registerFactory(ContextFactory<Context> configuration)
Context getContext(java.lang.String name)
Context getContextByKey(java.lang.String name, java.lang.Object key)
void removeContext(java.lang.String name) throws ScopeRuntimeException
ScopeRuntimeException
void removeContextByKey(java.lang.String name, java.lang.Object key) throws ScopeRuntimeException
ScopeRuntimeException
|
Tuscany Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |