org.picocontainer.lifecycle
Class DefaultLifecycleState

java.lang.Object
  extended by org.picocontainer.lifecycle.DefaultLifecycleState
All Implemented Interfaces:
Serializable, LifecycleState

public class DefaultLifecycleState
extends Object
implements LifecycleState, Serializable

Bean-like implementation of LifecycleState.

Author:
Paul Hammant, Michael Rimov
See Also:
Serialized Form

Constructor Summary
DefaultLifecycleState()
           
 
Method Summary
 void disposed()
          Turns the lifecycle state to completely disposed.
 void disposing()
          Turns the lifecycle state to indicate that the dispose() process is being executed on the container.
 boolean isConstructed()
          Returns true if no other state has been triggered so far.
 boolean isDisposed()
          Checks if the current lifecycle is disposed.
 boolean isStarted()
          Checks if current lifecycle is started.
 boolean isStopped()
          Checks if the current lifecyle is stopped.
 void removingComponent()
          Lifecycle state for when a component is being removed.
 void starting()
          Start is normally allowed if the object is constructed or already stopped.
 void stopped()
          Lifecycle state for when stop has been completed.
 void stopping()
          Lifecycle state for when the container is being stopped.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLifecycleState

public DefaultLifecycleState()
Method Detail

removingComponent

public void removingComponent()
Lifecycle state for when a component is being removed.

Specified by:
removingComponent in interface LifecycleState

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:
starting in interface LifecycleState

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:
stopping in interface LifecycleState

stopped

public void stopped()
Lifecycle state for when stop has been completed.

Specified by:
stopped in interface LifecycleState

isStarted

public boolean isStarted()
Checks if current lifecycle is started.

Specified by:
isStarted in interface LifecycleState
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:
disposing in interface LifecycleState

disposed

public void disposed()
Turns the lifecycle state to completely disposed. Internally called after PicoContainer.dispose() is finished.

Specified by:
disposed in interface LifecycleState

isDisposed

public boolean isDisposed()
Checks if the current lifecycle is disposed.

Specified by:
isDisposed in interface LifecycleState
Returns:
true if the current state is DISPOSED.

isStopped

public boolean isStopped()
Checks if the current lifecyle is stopped.

Specified by:
isStopped in interface LifecycleState
Returns:
true if the current state is STOPPED;

isConstructed

public boolean isConstructed()
Returns true if no other state has been triggered so far.

Returns:


Copyright © 2003-2010 Codehaus. All Rights Reserved.