org.picocontainer
Interface LifecycleStrategy
- All Known Subinterfaces:
- BehaviorAdapterTestCase.ComponentAdapterThatCanManageLifecycle, CachedTestCase.ComponentAdapterSupportingLifecycleStrategy
- All Known Implementing Classes:
- AbstractBehavior, AbstractComponentAdapterTest.CollectingBehavior, AbstractComponentAdapterTest.CycleDetectorBehavior, AbstractComponentAdapterTest.NotInstantiatableBehavior, AbstractComponentAdapterTest.RecordingLifecycleStrategy, AbstractInjector, AbstractMonitoringLifecycleStrategy, AbstractPicoContainerTest.TestBehavior, AnnotatedFieldInjector, AnnotatedMethodInjector, AsmHiddenImplementation, Assimilated, Automated, Cached, CompositeInjector, ConstructorInjector, Decorated, DefaultPicoContainerTestCase.FailingLifecycleStrategy, FieldDecorated, HiddenImplementation, HiddenImplementation, HotSwappable, InstanceAdapter, Intercepted, IterativeInjector, JavaEE5LifecycleStrategy, JMXExposed, JNDIExposed, Locked, MethodInjector, MultiInjector, NamedFieldInjector, NullLifecycleStrategy, Pooled, PropertyApplicator, ReflectionLifecycleStrategy, SetterInjector, SimpleNamedBindingAnnotationTestCase.FieldInjector, SingleMemberInjector, StartableLifecycleStrategy, Stored, Synchronized, ThreadCached, ThreadLocalized, TypedFieldInjector
public interface LifecycleStrategy
An interface which specifies the lifecycle strategy on the component instance.
Lifecycle strategies are used by component adapters to delegate the lifecycle
operations on the component instances.
- Author:
- Paul Hammant, Peter Royal, Jörg Schaible, Mauro Talevi
- See Also:
Startable
,
Disposable
Method Summary |
void |
dispose(Object component)
Invoke the "dispose" method on the component instance if this is disposable. |
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 |
stop(Object component)
Invoke the "stop" method on the component instance if this is stoppable. |
start
void start(Object component)
- Invoke the "start" method on the component instance if this is startable.
It is up to the implementation of the strategy what "start" and "startable" means.
- Parameters:
component
- the instance of the component to start
stop
void stop(Object component)
- Invoke the "stop" method on the component instance if this is stoppable.
It is up to the implementation of the strategy what "stop" and "stoppable" means.
- Parameters:
component
- the instance of the component to stop
dispose
void dispose(Object component)
- Invoke the "dispose" method on the component instance if this is disposable.
It is up to the implementation of the strategy what "dispose" and "disposable" means.
- Parameters:
component
- the instance of the component to dispose
hasLifecycle
boolean hasLifecycle(Class<?> type)
- Test if a component instance has a lifecycle.
- Parameters:
type
- the component's type
- Returns:
true
if the component has a lifecycle
Copyright © 2003-2010 Codehaus. All Rights Reserved.