Package org.picocontainer.lifecycle
Class DefaultLifecycleState
- java.lang.Object
-
- org.picocontainer.lifecycle.DefaultLifecycleState
-
- All Implemented Interfaces:
java.io.Serializable,LifecycleState
public class DefaultLifecycleState extends java.lang.Object implements LifecycleState, java.io.Serializable
Bean-like implementation of LifecycleState.- Author:
- Paul Hammant, Michael Rimov
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultLifecycleState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisposed()Turns the lifecycle state to completely disposed.voiddisposing()Turns the lifecycle state to indicate that the dispose() process is being executed on the container.booleanisConstructed()Returns true if no other state has been triggered so far.booleanisDisposed()Checks if the current lifecycle is disposed.booleanisStarted()Checks if current lifecycle is started.booleanisStopped()Checks if the current lifecyle is stopped.voidremovingComponent()Lifecycle state for when a component is being removed.voidstarting()Start is normally allowed if the object is constructed or already stopped.voidstopped()Lifecycle state for when stop has been completed.voidstopping()Lifecycle state for when the container is being stopped.
-
-
-
Method Detail
-
removingComponent
public void removingComponent()
Lifecycle state for when a component is being removed.- Specified by:
removingComponentin interfaceLifecycleState
-
starting
public void starting()
Start is normally allowed if the object is constructed or already stopped. It is not allowed if the system is already started or disposed.- Specified by:
startingin interfaceLifecycleState
-
stopping
public void stopping()
Lifecycle state for when the container is being stopped. (Ie, right after Picocontainer.stop() has been called, but before any components are stopped.- Specified by:
stoppingin interfaceLifecycleState
-
stopped
public void stopped()
Lifecycle state for when stop has been completed.- Specified by:
stoppedin interfaceLifecycleState
-
isStarted
public boolean isStarted()
Checks if current lifecycle is started.- Specified by:
isStartedin interfaceLifecycleState- Returns:
- true if the current container state is STARTED.
-
disposing
public void disposing()
Turns the lifecycle state to indicate that the dispose() process is being executed on the container.- Specified by:
disposingin interfaceLifecycleState
-
disposed
public void disposed()
Turns the lifecycle state to completely disposed. Internally called after PicoContainer.dispose() is finished.- Specified by:
disposedin interfaceLifecycleState
-
isDisposed
public boolean isDisposed()
Checks if the current lifecycle is disposed.- Specified by:
isDisposedin interfaceLifecycleState- Returns:
- true if the current state is DISPOSED.
-
isStopped
public boolean isStopped()
Checks if the current lifecyle is stopped.- Specified by:
isStoppedin interfaceLifecycleState- Returns:
- true if the current state is STOPPED;
-
isConstructed
public boolean isConstructed()
Returns true if no other state has been triggered so far.- Returns:
-
-