jfun.yan.lifecycle
Class DefaultLifecycleManager.DefaultLifecycle

java.lang.Object
  extended by jfun.yan.lifecycle.Lifecycle
      extended by jfun.yan.lifecycle.DefaultLifecycleManager.DefaultLifecycle
All Implemented Interfaces:
java.io.Serializable, Life
Enclosing class:
DefaultLifecycleManager

public class DefaultLifecycleManager.DefaultLifecycle
extends Lifecycle

This class is a Lifecycle that directly supports the default "init-verify-open-start-stop-close-dispose" life-cycle scheme.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class jfun.yan.lifecycle.Lifecycle
Lifecycle.Entry
 
Constructor Summary
DefaultLifecycleManager.DefaultLifecycle()
           
 
Method Summary
 DefaultLifecycleManager.DefaultLifecycle closer(Procedure proc)
          To register the "close" phase as re-entrant.
 DefaultLifecycleManager.DefaultLifecycle closer(Procedure proc, boolean reentrant)
          To register the "close" phase.
 DefaultLifecycleManager.DefaultLifecycle closer(java.lang.String method_name)
          To register the "close" phase as re-entrant.
 DefaultLifecycleManager.DefaultLifecycle disposer(Procedure proc)
          To register the "dispose" phase as non-reentrant.
 DefaultLifecycleManager.DefaultLifecycle disposer(Procedure proc, boolean reentrant)
          To register the "dispose" phase.
 DefaultLifecycleManager.DefaultLifecycle disposer(java.lang.String method_name)
          To register the "dispose" phase as non-reentrant.
 DefaultLifecycleManager.DefaultLifecycle initializer(Procedure proc)
          To register the "init" phase as non-reentrant.
 DefaultLifecycleManager.DefaultLifecycle initializer(Procedure proc, boolean reentrant)
          To register the "init" phase.
 DefaultLifecycleManager.DefaultLifecycle initializer(java.lang.String method_name)
          To register the "init" phase as non-reentrant.
 Component manage(Component c)
          To create a Component with the current lifecycle.
 void manageInstance(java.lang.Object obj)
          Manage an instance's life.
 DefaultLifecycleManager.DefaultLifecycle opener(Procedure proc)
          To register the "open" phase as re-entrant.
 DefaultLifecycleManager.DefaultLifecycle opener(Procedure proc, boolean reentrant)
          To register the "open" phase.
 DefaultLifecycleManager.DefaultLifecycle opener(java.lang.String method_name)
          To register the "open" phase as re-entrant.
 DefaultLifecycleManager.DefaultLifecycle starter(Procedure proc)
          To register the "start" phase as re-entrant.
 DefaultLifecycleManager.DefaultLifecycle starter(Procedure proc, boolean reentrant)
          To register the "start" phase.
 DefaultLifecycleManager.DefaultLifecycle starter(java.lang.String method_name)
          To register the "start" phase as re-entrant.
 DefaultLifecycleManager.DefaultLifecycle stopper(Procedure proc)
          To register the "stop" phase as re-entrant.
 DefaultLifecycleManager.DefaultLifecycle stopper(Procedure proc, boolean reentrant)
          To register the "stop" phase.
 DefaultLifecycleManager.DefaultLifecycle stopper(java.lang.String method_name)
          To register the "stop" phase as re-entrant.
 DefaultLifecycleManager.DefaultLifecycle verifier(Procedure proc)
          To register the "verify" phase as reentrant.
 DefaultLifecycleManager.DefaultLifecycle verifier(Procedure proc, boolean reentrant)
          To register the "verify" phase.
 DefaultLifecycleManager.DefaultLifecycle verifier(java.lang.String method_name)
          To register the "verify" phase as reentrant.
 
Methods inherited from class jfun.yan.lifecycle.Lifecycle
bear, entries, get, isEmpty, keys, put, remove, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLifecycleManager.DefaultLifecycle

public DefaultLifecycleManager.DefaultLifecycle()
Method Detail

opener

public DefaultLifecycleManager.DefaultLifecycle opener(Procedure proc,
                                                       boolean reentrant)
To register the "open" phase.

Parameters:
proc - the phase procedure.
reentrant - whether the procedure is re-entrant.
Returns:
this DefaultLifecycle object itself.

closer

public DefaultLifecycleManager.DefaultLifecycle closer(Procedure proc,
                                                       boolean reentrant)
To register the "close" phase.

Parameters:
proc - the phase procedure.
reentrant - whether the procedure is re-entrant.
Returns:
this DefaultLifecycle object itself.

initializer

public DefaultLifecycleManager.DefaultLifecycle initializer(Procedure proc,
                                                            boolean reentrant)
To register the "init" phase.

Parameters:
proc - the phase procedure.
reentrant - whether the procedure is re-entrant.
Returns:
this DefaultLifecycle object itself.

disposer

public DefaultLifecycleManager.DefaultLifecycle disposer(Procedure proc,
                                                         boolean reentrant)
To register the "dispose" phase.

Parameters:
proc - the phase procedure.
reentrant - whether the procedure is re-entrant.
Returns:
this DefaultLifecycle object itself.

verifier

public DefaultLifecycleManager.DefaultLifecycle verifier(Procedure proc,
                                                         boolean reentrant)
To register the "verify" phase.

Parameters:
proc - the phase procedure.
reentrant - whether the procedure is re-entrant.
Returns:
this DefaultLifecycle object itself.

starter

public DefaultLifecycleManager.DefaultLifecycle starter(Procedure proc,
                                                        boolean reentrant)
To register the "start" phase.

Parameters:
proc - the phase procedure.
reentrant - whether the procedure is re-entrant.
Returns:
this DefaultLifecycle object itself.

stopper

public DefaultLifecycleManager.DefaultLifecycle stopper(Procedure proc,
                                                        boolean reentrant)
To register the "stop" phase.

Parameters:
proc - the phase procedure.
reentrant - whether the procedure is re-entrant.
Returns:
this DefaultLifecycle object itself.

opener

public DefaultLifecycleManager.DefaultLifecycle opener(Procedure proc)
To register the "open" phase as re-entrant.

Parameters:
proc - the phase procedure.
Returns:
this DefaultLifecycle object itself.

closer

public DefaultLifecycleManager.DefaultLifecycle closer(Procedure proc)
To register the "close" phase as re-entrant.

Parameters:
proc - the phase procedure.
Returns:
this DefaultLifecycle object itself.

initializer

public DefaultLifecycleManager.DefaultLifecycle initializer(Procedure proc)
To register the "init" phase as non-reentrant.

Parameters:
proc - the phase procedure.
Returns:
this DefaultLifecycle object itself.

disposer

public DefaultLifecycleManager.DefaultLifecycle disposer(Procedure proc)
To register the "dispose" phase as non-reentrant.

Parameters:
proc - the phase procedure.
Returns:
this DefaultLifecycle object itself.

verifier

public DefaultLifecycleManager.DefaultLifecycle verifier(Procedure proc)
To register the "verify" phase as reentrant.

Parameters:
proc - the phase procedure.
Returns:
this DefaultLifecycle object itself.

starter

public DefaultLifecycleManager.DefaultLifecycle starter(Procedure proc)
To register the "start" phase as re-entrant.

Parameters:
proc - the phase procedure.
Returns:
this DefaultLifecycle object itself.

stopper

public DefaultLifecycleManager.DefaultLifecycle stopper(Procedure proc)
To register the "stop" phase as re-entrant.

Parameters:
proc - the phase procedure.
Returns:
this DefaultLifecycle object itself.

opener

public DefaultLifecycleManager.DefaultLifecycle opener(java.lang.String method_name)
To register the "open" phase as re-entrant.

Parameters:
method_name - the name of the parameter-less method.
Returns:
this DefaultLifecycle object itself.

closer

public DefaultLifecycleManager.DefaultLifecycle closer(java.lang.String method_name)
To register the "close" phase as re-entrant.

Parameters:
method_name - the name of the parameter-less method.
Returns:
this DefaultLifecycle object itself.

initializer

public DefaultLifecycleManager.DefaultLifecycle initializer(java.lang.String method_name)
To register the "init" phase as non-reentrant.

Parameters:
method_name - the name of the parameter-less method.
Returns:
this DefaultLifecycle object itself.

disposer

public DefaultLifecycleManager.DefaultLifecycle disposer(java.lang.String method_name)
To register the "dispose" phase as non-reentrant.

Parameters:
method_name - the name of the parameter-less method.
Returns:
this DefaultLifecycle object itself.

verifier

public DefaultLifecycleManager.DefaultLifecycle verifier(java.lang.String method_name)
To register the "verify" phase as reentrant.

Parameters:
method_name - the name of the parameter-less method.
Returns:
this DefaultLifecycle object itself.

starter

public DefaultLifecycleManager.DefaultLifecycle starter(java.lang.String method_name)
To register the "start" phase as re-entrant.

Parameters:
method_name - the name of the parameter-less method.
Returns:
this DefaultLifecycle object itself.

stopper

public DefaultLifecycleManager.DefaultLifecycle stopper(java.lang.String method_name)
To register the "stop" phase as re-entrant.

Parameters:
method_name - the name of the parameter-less method.
Returns:
this DefaultLifecycle object itself.

manage

public Component manage(Component c)
To create a Component with the current lifecycle.

Parameters:
c - the Component to be managed by the lifecycle.
Returns:
the new Component object with lifecycle management.

manageInstance

public void manageInstance(java.lang.Object obj)
Manage an instance's life.

Parameters:
obj - the instance.