|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.picocontainer.lifecycle.AbstractMonitoringLifecycleStrategy org.picocontainer.lifecycle.StartableLifecycleStrategy
public class StartableLifecycleStrategy
Startable lifecycle strategy. Starts and stops component if Startable, and disposes it if Disposable. A subclass of this class can define other intrfaces for Startable/Disposable as well as other method names for start/stop/dispose
Startable
,
Disposable
,
Serialized FormConstructor Summary | |
---|---|
StartableLifecycleStrategy(ComponentMonitor monitor)
|
Method Summary | |
---|---|
void |
dispose(Object component)
Invoke the "dispose" method on the component instance if this is disposable. |
protected void |
disposeComponent(Object component)
|
protected Class |
getDisposableInterface()
|
protected String |
getDisposeMethodName()
Retrieve the lifecycle method name that represents the dispose method. |
protected Class |
getStartableInterface()
|
protected String |
getStartMethodName()
Retrieve the lifecycle method name that represents the start method. |
protected String |
getStopMethodName()
Retrieve the lifecycle method name that represents the stop method. |
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. |
protected void |
startComponent(Object component)
|
void |
stop(Object component)
Invoke the "stop" method on the component instance if this is stoppable. |
protected void |
stopComponent(Object component)
|
Methods inherited from class org.picocontainer.lifecycle.AbstractMonitoringLifecycleStrategy |
---|
changeMonitor, currentMonitor, isLazy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StartableLifecycleStrategy(ComponentMonitor monitor)
Method Detail |
---|
protected String getDisposeMethodName()
protected String getStopMethodName()
protected String getStartMethodName()
public void start(Object component)
component
- the instance of the component to startprotected void startComponent(Object component)
protected void stopComponent(Object component)
protected void disposeComponent(Object component)
public void stop(Object component)
component
- the instance of the component to stoppublic void dispose(Object component)
component
- the instance of the component to disposepublic boolean hasLifecycle(Class<?> type)
type
- the component's type
true
if the component has a lifecycleprotected Class getDisposableInterface()
protected Class getStartableInterface()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |