|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.picocontainer.behaviors.AbstractBehavior<T>
org.picocontainer.behaviors.Stored<T>
T - public abstract class Stored<T>
abstract base behaviour for all behaviours wishing to store their component in "awkward places" ( object references )
| Field Summary | |
|---|---|
protected boolean |
delegateHasLifecylce
|
protected boolean |
disposed
|
protected ObjectReference<T> |
instanceReference
|
protected boolean |
started
|
| Fields inherited from class org.picocontainer.behaviors.AbstractBehavior |
|---|
delegate |
| Constructor Summary | |
|---|---|
Stored(ComponentAdapter<T> delegate,
ObjectReference<T> reference)
|
|
| Method Summary | |
|---|---|
boolean |
componentHasLifecycle()
Invokes delegate hasLifecycle method if the delegate is a Behavior Test if a component honors a lifecycle. |
void |
dispose(PicoContainer container)
Disposes the cached component instance Invokes delegate dispose method if the delegate is a Behavior Invoke the "dispose" method on the component. |
void |
flush()
Flushes the cache. |
T |
getComponentInstance(PicoContainer container)
Retrieve the component instance. |
void |
start(PicoContainer container)
Starts the cached component instance Invokes delegate start method if the delegate is a Behavior Invoke the "start" method on the component. |
void |
stop(PicoContainer container)
Stops the cached component instance Invokes delegate stop method if the delegate is a Behavior Invoke the "stop" method on the component. |
| Methods inherited from class org.picocontainer.behaviors.AbstractBehavior |
|---|
accept, changeMonitor, currentMonitor, dispose, findAdapterOfType, getComponentImplementation, getComponentKey, getDelegate, hasLifecycle, start, stop, toString, verify |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final boolean delegateHasLifecylce
protected boolean disposed
protected final ObjectReference<T> instanceReference
protected boolean started
| Constructor Detail |
|---|
public Stored(ComponentAdapter<T> delegate,
ObjectReference<T> reference)
| Method Detail |
|---|
public boolean componentHasLifecycle()
AbstractBehavior
componentHasLifecycle in interface Behavior<T>componentHasLifecycle in class AbstractBehavior<T>true if the component has a lifecyclepublic void dispose(PicoContainer container)
dispose in interface Behavior<T>dispose in class AbstractBehavior<T>container - the container to "dispose" the componentpublic void flush()
public T getComponentInstance(PicoContainer container)
throws PicoCompositionException
ComponentAdapterCached will always return the
same instance.
getComponentInstance in interface ComponentAdapter<T>getComponentInstance in class AbstractBehavior<T>container - the PicoContainer, that is used to resolve any possible dependencies of the instance.
PicoCompositionException - if the component could not be instantiated.public void start(PicoContainer container)
start in interface Behavior<T>start in class AbstractBehavior<T>container - the container to "start" the componentpublic void stop(PicoContainer container)
stop in interface Behavior<T>stop in class AbstractBehavior<T>container - the container to "stop" the component
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||