org.sapia.soto.lifecycle
Interface LifeCycleManager

All Known Implementing Classes:
DefaultLifeCycleManager

public interface LifeCycleManager


Method Summary
 void dispose(Env env)
          This method is called on this instance when the Soto container's dispose() method is called, after all services have been initialized.
 void disposeService(ServiceConfiguration conf)
          This method is called by the Soto container when a given service's dispose/destroy method is to be called.
 java.lang.Class getServiceClass(java.lang.Object service)
          This method is called by lookup code that searches services based on their type.
 void init(Env env)
          This method is called on this instance when the Soto container's init() method is called, prior to initializing any service.
 void initService(ServiceConfiguration conf)
          This method is called by the Soto container when a given service's initialization method is to be called.
 java.lang.Object lookupService(java.lang.String name, java.lang.Object service)
          This method is called by the Soto container when a service has been successfully looked up.
 void postInit(Env env)
          This method is called on this instance when the Soto container's init() method is called, after all services have been initialized.
 void startService(ServiceConfiguration conf)
          This method is called by the Soto container when a given service's startup method is to be called.
 

Method Detail

init

void init(Env env)
This method is called on this instance when the Soto container's init() method is called, prior to initializing any service.

Parameters:
env - the Env instance corresponding to the Soto container in the context of which this manager is used.

postInit

void postInit(Env env)
This method is called on this instance when the Soto container's init() method is called, after all services have been initialized.

Parameters:
env - the Env instance corresponding to the Soto container in the context of which this manager is used.
Throws:
java.lang.Exception - if a problem occurs.

dispose

void dispose(Env env)
This method is called on this instance when the Soto container's dispose() method is called, after all services have been initialized.

Parameters:
env - the Env instance corresponding to the Soto container in the context of which this manager is used.

initService

void initService(ServiceConfiguration conf)
                 throws java.lang.Exception
This method is called by the Soto container when a given service's initialization method is to be called.

Parameters:
conf - a ServiceConfiguration instance.
Throws:
java.lang.Exception - if a problem occurs while performing the initialization.

startService

void startService(ServiceConfiguration conf)
                  throws java.lang.Exception
This method is called by the Soto container when a given service's startup method is to be called.

Parameters:
conf - a ServiceConfiguration instance.
Throws:
java.lang.Exception - if a problem occurs while performing the startup.

lookupService

java.lang.Object lookupService(java.lang.String name,
                               java.lang.Object service)
This method is called by the Soto container when a service has been successfully looked up.

Parameters:
name - the name used by the client application when performing the lookup, or null if the lookup was not performed by name.
service - the service object that was found.
Returns:
the service object to return to the client application.

getServiceClass

java.lang.Class getServiceClass(java.lang.Object service)
This method is called by lookup code that searches services based on their type.

Parameters:
service - a service instance.
Returns:
the Class corresponding to the type of the service.

disposeService

void disposeService(ServiceConfiguration conf)
                    throws java.lang.Exception
This method is called by the Soto container when a given service's dispose/destroy method is to be called.

Parameters:
conf - a ServiceConfiguration instance.
Throws:
java.lang.Exception - if a problem occurs while performing the disposal/destruction.


Copyright © 2010 Sapia OSS. All Rights Reserved.