jfun.yan.lifecycle
Class DefaultLifecycleManager

java.lang.Object
  extended by jfun.yan.lifecycle.LifecycleManager
      extended by jfun.yan.lifecycle.DefaultLifecycleManager

public class DefaultLifecycleManager
extends LifecycleManager

A LifecycleManager that directly supports the default "init-verify-open-start-stop-close-dispose" scheme.

Zephyr Business Solution

Author:
Michelle Lei

Nested Class Summary
 class DefaultLifecycleManager.DefaultLifecycle
          This class is a Lifecycle that directly supports the default "init-verify-open-start-stop-close-dispose" life-cycle scheme.
 
Constructor Summary
DefaultLifecycleManager()
          To create a DefaultLifecycleManager object.
Equivalent to this(new DefaultLifecycleDescriptor()).
DefaultLifecycleManager(DefaultLifecycleDescriptor desc)
          To create a DefaultLifecycleManager object.
 
Method Summary
 void close()
          To call the "close" phase for all managed instances.
 void dispose()
          To call the "dispose" phase for all managed instances.
 void init()
          To call the "init" phase for all managed instances.
 DefaultLifecycleManager.DefaultLifecycle newLifecycle()
          To create a DefaultLifecycle object.
 void open()
          To call the "open" phase for all managed instances.
 void start()
          To call the "start" phase for all managed instances.
 void stop()
          To call the "stop" phase for all managed instances.
 void verify()
          To call the "verify" phase for all managed instances.
 
Methods inherited from class jfun.yan.lifecycle.LifecycleManager
addLiveObject, fifo, filo, getManagedInstances, withLifecycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLifecycleManager

public DefaultLifecycleManager(DefaultLifecycleDescriptor desc)
To create a DefaultLifecycleManager object.

Parameters:
desc - the descriptor of the phases.

DefaultLifecycleManager

public DefaultLifecycleManager()
To create a DefaultLifecycleManager object.
Equivalent to this(new DefaultLifecycleDescriptor()).

Method Detail

close

public void close()
           throws java.lang.Throwable
To call the "close" phase for all managed instances.

Throws:
java.lang.Throwable - when any exception happens.

dispose

public void dispose()
             throws java.lang.Throwable
To call the "dispose" phase for all managed instances.

Throws:
java.lang.Throwable - when any exception happens.

init

public void init()
          throws java.lang.Throwable
To call the "init" phase for all managed instances.

Throws:
java.lang.Throwable - when any exception happens.

verify

public void verify()
            throws java.lang.Throwable
To call the "verify" phase for all managed instances.

Throws:
java.lang.Throwable - when any exception happens.

open

public void open()
          throws java.lang.Throwable
To call the "open" phase for all managed instances.

Throws:
java.lang.Throwable - when any exception happens.

start

public void start()
           throws java.lang.Throwable
To call the "start" phase for all managed instances.

Throws:
java.lang.Throwable - when any exception happens.

stop

public void stop()
          throws java.lang.Throwable
To call the "stop" phase for all managed instances.

Throws:
java.lang.Throwable - when any exception happens.

newLifecycle

public DefaultLifecycleManager.DefaultLifecycle newLifecycle()
To create a DefaultLifecycle object.