|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.picocontainer.defaults.MonitoringComponentAdapter
org.picocontainer.defaults.AbstractComponentAdapter
org.picocontainer.defaults.InstanceComponentAdapter
Component adapter which wraps a component instance.
This component adapter supports both a LifecycleManager and a
LifecycleStrategy to control the lifecycle of the component.
The lifecycle manager methods simply delegate to the lifecycle strategy methods
on the component instance.
| Constructor Summary | |
InstanceComponentAdapter(Object componentKey,
Object componentInstance)
|
|
InstanceComponentAdapter(Object componentKey,
Object componentInstance,
LifecycleStrategy lifecycleStrategy)
|
|
| Method Summary | |
void |
dispose(Object component)
Invoke the "dispose" method on the component instance if this is disposable. |
void |
dispose(PicoContainer container)
Invoke the "dispose" method on the container's components. |
Object |
getComponentInstance(PicoContainer container)
Retrieve the component instance. |
boolean |
hasLifecycle()
Test if a container's component has a lifecycle. |
boolean |
hasLifecycle(Class type)
Test if a component instance has a lifecycle. |
void |
start(Object component)
Invoke the "start" method on the component instance if this is startable. |
void |
start(PicoContainer container)
Invoke the "start" method on the container's components. |
void |
stop(Object component)
Invoke the "stop" method on the component instance if this is stoppable. |
void |
stop(PicoContainer container)
Invoke the "stop" method on the container's components. |
void |
verify(PicoContainer container)
Verify that all dependencies for this adapter can be satisifed. |
| Methods inherited from class org.picocontainer.defaults.AbstractComponentAdapter |
accept, checkTypeCompatibility, getComponentImplementation, getComponentKey, toString |
| Methods inherited from class org.picocontainer.defaults.MonitoringComponentAdapter |
changeMonitor, currentMonitor |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public InstanceComponentAdapter(Object componentKey,
Object componentInstance)
throws AssignabilityRegistrationException,
NotConcreteRegistrationException
public InstanceComponentAdapter(Object componentKey,
Object componentInstance,
LifecycleStrategy lifecycleStrategy)
throws AssignabilityRegistrationException,
NotConcreteRegistrationException
| Method Detail |
public Object getComponentInstance(PicoContainer container)
ComponentAdapterCachingComponentAdapter will always return the
same instance.
getComponentInstance in interface ComponentAdaptercontainer - the PicoContainer, that is used to resolve any possible dependencies of the instance.
public void verify(PicoContainer container)
ComponentAdapter
verify in interface ComponentAdaptercontainer - the PicoContainer, that is used to resolve any possible dependencies of the instance.public void start(PicoContainer container)
LifecycleManager
start in interface LifecycleManagercontainer - the container to "start" its components' lifecyclepublic void stop(PicoContainer container)
LifecycleManager
stop in interface LifecycleManagercontainer - the container to "stop" its components' lifecyclepublic void dispose(PicoContainer container)
LifecycleManager
dispose in interface LifecycleManagercontainer - the container to "dispose" its components' lifecyclepublic boolean hasLifecycle()
LifecycleManager
hasLifecycle in interface LifecycleManagertrue if the component has a lifecyclepublic void start(Object component)
LifecycleStrategy
start in interface LifecycleStrategycomponent - the instance of the component to startpublic void stop(Object component)
LifecycleStrategy
stop in interface LifecycleStrategycomponent - the instance of the component to stoppublic void dispose(Object component)
LifecycleStrategy
dispose in interface LifecycleStrategycomponent - the instance of the component to disposepublic boolean hasLifecycle(Class type)
LifecycleStrategy
hasLifecycle in interface LifecycleStrategytype - the component's type
true if the component has a lifecycle
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||