|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.picocontainer.lifecycle.CompositeLifecycleStrategy
public class CompositeLifecycleStrategy
Allow for use of alternate LifecycleStrategy strategies to be used at the same time. A component can be started/stopped/disposed according to *any* of the supplied LifecycleStrategy instances.
Constructor Summary | |
---|---|
CompositeLifecycleStrategy(StartableLifecycleStrategy... alternateStrategies)
|
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. |
boolean |
isLazy(ComponentAdapter<?> adapter)
Is a component eager (not lazy) in that it should start when start() or equivalent is called, or lazy (it will only start on first getComponent() ). |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompositeLifecycleStrategy(StartableLifecycleStrategy... alternateStrategies)
Method Detail |
---|
public void start(Object component)
LifecycleStrategy
start
in interface LifecycleStrategy
component
- the instance of the component to startpublic void stop(Object component)
LifecycleStrategy
stop
in interface LifecycleStrategy
component
- the instance of the component to stoppublic void dispose(Object component)
LifecycleStrategy
dispose
in interface LifecycleStrategy
component
- the instance of the component to disposepublic boolean hasLifecycle(Class<?> type)
LifecycleStrategy
hasLifecycle
in interface LifecycleStrategy
type
- the component's type
true
if the component has a lifecyclepublic boolean isLazy(ComponentAdapter<?> adapter)
LifecycleStrategy
isLazy
in interface LifecycleStrategy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |