| org.apache.turbine.services.InitableBroker
All known Subclasses: org.apache.turbine.services.BaseInitableBroker,
InitableBroker | public interface InitableBroker (Code) | | Classes that implement this interface can act as a broker for
Initable classes.
Functionality provided by the broker includes:
- Maintaining a single instance of each
Initable in
the system.
- Early initialization of
Initables during system
startup.
- Late initialization of
Initables before they are
used.
- Providing instances of
Initables to requesting
parties.
- Maintainging dependencies between
Initables during
early initalization phases, including circular dependencies
detection.
author: Kevin Burton author: Rafal Krzewski version: $Id: InitableBroker.java 534527 2007-05-02 16:10:59Z tv $ |
Method Summary | |
Initable | getInitable(String className) Provides an instance of Initable class ready to work.
If the requested class couldn't be instatiated or initialized,
InstantiationException will be thrown. | void | initClass(String className, Object data) Performs early initialization of an Initable class. | void | shutdownClass(String className) Shutdowns an Initable class. |
getInitable | Initable getInitable(String className) throws InstantiationException(Code) | | Provides an instance of Initable class ready to work.
If the requested class couldn't be instatiated or initialized,
InstantiationException will be thrown. You needn't handle this
exception in your code, since it indicates fatal
misconfigurtion of the system.
Parameters: className - The name of the Initable requested. An instance of requested Initable. exception: InstantiationException - if there was a problemduring instantiation or initialization of the Initable. |
initClass | void initClass(String className, Object data) throws InitializationException(Code) | | Performs early initialization of an Initable class.
If your class depends on another Initable being initialized to
perform early initialization, you should always ask your broker
to initialize the other class with the objects that are passed
to you, before you try to retrieve that Initable's instance with
getInitable().
Parameters: className - The name of the class to be initailized. Parameters: data - An object to be used for initialization activities. exception: InitializationException - if initialization of thisclass was not successful. |
shutdownClass | void shutdownClass(String className)(Code) | | Shutdowns an Initable class.
This method is used to release resources allocated by an
Initable class, and return it to initial (uninitailized)
state.
Parameters: className - The name of the class to be uninitialized. |
|
|