|
Tuscany Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tuscany.core.context.impl.AbstractLifecycle
org.apache.tuscany.core.context.impl.AbstractContext
org.apache.tuscany.core.system.context.SystemAtomicContext
public class SystemAtomicContext
Manages system component implementation instances
Field Summary | |
---|---|
protected int |
type
|
Fields inherited from class org.apache.tuscany.core.context.impl.AbstractLifecycle |
---|
lifecycleState, name |
Fields inherited from interface org.apache.tuscany.core.context.Lifecycle |
---|
CONFIG_ERROR, ERROR, INITIALIZED, INITIALIZING, RUNNING, STARTED, STOPPED, STOPPING, UNINITIALIZED |
Constructor Summary | |
---|---|
SystemAtomicContext(String name,
ObjectFactory objectFactory,
boolean eagerInit,
EventInvoker<Object> initInvoker,
EventInvoker<Object> destroyInvoker,
boolean stateless)
|
Method Summary | |
---|---|
void |
destroy()
Notifies the context of a destroy event |
Object |
getInstance(QualifiedName qName)
Returns the instance associated with the requested name, which may be in a atomic or composite form. |
Object |
getTargetInstance()
Returns the target instance associated with the context. |
int |
getType()
|
void |
init()
Notifies the context of an initialization event |
boolean |
isDestroyable()
Returns whether the context should be called back when its scope ends |
boolean |
isEagerInit()
Returns whether the context should be eagerly initialized |
void |
setName(String name)
Sets the name of the Lifecycle. |
void |
setType(int type)
|
void |
start()
Starts the Lifecycle. |
void |
stop()
Stops the Lifecycle. |
Methods inherited from class org.apache.tuscany.core.context.impl.AbstractLifecycle |
---|
addListener, addListener, getLifecycleState, getListeners, getName, publish, removeListener, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.tuscany.core.context.EventPublisher |
---|
addListener, addListener, publish, removeListener |
Methods inherited from interface org.apache.tuscany.core.context.Lifecycle |
---|
getLifecycleState, getName |
Field Detail |
---|
protected int type
Constructor Detail |
---|
public SystemAtomicContext(String name, ObjectFactory objectFactory, boolean eagerInit, EventInvoker<Object> initInvoker, EventInvoker<Object> destroyInvoker, boolean stateless)
Method Detail |
---|
public void setName(String name)
Lifecycle
setName
in interface Lifecycle
setName
in class AbstractLifecycle
name
- the name of the Lifecyclepublic int getType()
public void setType(int type)
public void init() throws TargetException
AtomicContext
init
in interface AtomicContext
TargetException
public void destroy() throws TargetException
AtomicContext
destroy
in interface AtomicContext
TargetException
public Object getInstance(QualifiedName qName) throws TargetException
Context
getInstance
in interface Context
qName
- a qualified name of the requested instance
TargetException
- if an error occurs retrieving the instance or the requested component is not an entry
point.CompositeContext
,
EntryPoint
public Object getTargetInstance() throws TargetException
AtomicContext
getTargetInstance
in interface AtomicContext
TargetException
public boolean isEagerInit()
AtomicContext
isEagerInit
in interface AtomicContext
public boolean isDestroyable()
AtomicContext
isDestroyable
in interface AtomicContext
public void start() throws ContextInitException
Lifecycle
start
in interface Lifecycle
ContextInitException
public void stop()
Lifecycle
stop
in interface Lifecycle
|
Tuscany Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |