public class StartableLifecycleStrategy extends AbstractMonitoringLifecycleStrategy
Startable
,
Disposable
,
Serialized FormConstructor and Description |
---|
StartableLifecycleStrategy(ComponentMonitor monitor) |
Modifier and Type | Method and Description |
---|---|
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) |
changeMonitor, currentMonitor, isLazy
public StartableLifecycleStrategy(ComponentMonitor monitor)
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 typetrue
if the component has a lifecycleprotected Class getDisposableInterface()
protected Class getStartableInterface()
Copyright © 2003–2016 Codehaus. All rights reserved.