Clearspace API (1.10.16) Core Javadocs

com.jivesoftware.community.lifecycle
Interface ApplicationLifeCycle


public interface ApplicationLifeCycle

An interface to manage lifecycle events for the application. This interface is used internally by the application to facilitate proper startup and shutdown order of the application's managers and factories. Custom code that requires to be initialized and shutdown alongside the rest of the application can register itself either via the addListener method (say from a extension of the LifeCycleListener class) or via setting a Jive property 'jive.customJiveManagers.yourmanager' (replace 'yourmanager' with the custom manager name) with the value being the fully qualified name of a class which implements the JiveManager interface.

Except for the listener methods the methods in this class should never be called by any custom application code or client code.

See Also:
JiveApplication

Nested Class Summary
static interface ApplicationLifeCycle.Listener
          An interface for an application life cycle listener.
 
Method Summary
 void addListener(ApplicationLifeCycle.Listener listener)
          Add an application life cycle listener.
 void destroy(JiveApplication.ManagerHandler managerHandler)
          Called to shutdown the application.
 void initialize(JiveApplication.ManagerHandler managerHandler)
          Initialize the application using the provided manager handle to initialize the application's managers.
 void removeListener(ApplicationLifeCycle.Listener listener)
          Removes an application life cycle listener.
 

Method Detail

initialize

void initialize(JiveApplication.ManagerHandler managerHandler)
                throws java.lang.Throwable
Initialize the application using the provided manager handle to initialize the application's managers.

Parameters:
managerHandler - an instance of the ManagerHandler interface used to initialize the
Throws:
java.lang.Throwable

destroy

void destroy(JiveApplication.ManagerHandler managerHandler)
             throws java.lang.Throwable
Called to shutdown the application.

Parameters:
managerHandler - an instance of the ManagerHandler interface used when initializing the
Throws:
java.lang.Throwable

addListener

void addListener(ApplicationLifeCycle.Listener listener)
Add an application life cycle listener. This method is primarily useful for authors of custom code that need to hook into the startup and shutdown phases of the application for initializing and destroying resources used by the custom code.

Parameters:
listener - an application life cycle listener

removeListener

void removeListener(ApplicationLifeCycle.Listener listener)
Removes an application life cycle listener.

Parameters:
listener - the application life cycle listener to remove

Clearspace Project Page

Copyright © 1999-2007 Jive Software.