public class DefaultLifecycleStrategy extends AbstractMonitoringLifecycleStrategy
Startable
,
Disposable
,
Serialized FormModifier and Type | Field and Description |
---|---|
private static java.lang.reflect.Method |
dispose |
private static java.lang.reflect.Method |
start |
private static java.lang.reflect.Method |
stop |
Constructor and Description |
---|
DefaultLifecycleStrategy(ComponentMonitor monitor) |
Modifier and Type | Method and Description |
---|---|
void |
dispose(java.lang.Object component)
Invoke the "dispose" method on the component instance if this is disposable.
|
boolean |
hasLifecycle(java.lang.Class type)
Test if a component instance has a lifecycle.
|
void |
start(java.lang.Object component)
Invoke the "start" method on the component instance if this is startable.
|
void |
stop(java.lang.Object component)
Invoke the "stop" method on the component instance if this is stoppable.
|
changeMonitor, currentMonitor
private static java.lang.reflect.Method start
private static java.lang.reflect.Method stop
private static java.lang.reflect.Method dispose
public DefaultLifecycleStrategy(ComponentMonitor monitor)
public void start(java.lang.Object component)
LifecycleStrategy
component
- the instance of the component to startpublic void stop(java.lang.Object component)
LifecycleStrategy
component
- the instance of the component to stoppublic void dispose(java.lang.Object component)
LifecycleStrategy
component
- the instance of the component to disposepublic boolean hasLifecycle(java.lang.Class type)
LifecycleStrategy
type
- the component's typetrue
if the component has a lifecycle