public abstract class BaseInitableBroker extends Object implements InitableBroker
InitableBroker
.
Functionality provided by the broker includes:
Initable
in
the system.Initables
during system
startup.Initables
before they are
used.Initables
to requesting
parties.Initables
during
early initialization phases, including circular dependencies
detection.Modifier and Type | Field and Description |
---|---|
protected Hashtable<String,Initable> |
initables
A repository of Initable instances.
|
protected Stack<String> |
stack
Names of classes being early-initialized are pushed onto this
stack.
|
Modifier | Constructor and Description |
---|---|
protected |
BaseInitableBroker()
Default constructor of InitableBroker.
|
Modifier and Type | Method and Description |
---|---|
Initable |
getInitable(String className)
Provides an instance of Initable class ready to work.
|
protected Initable |
getInitableInstance(String className)
Retrieves an instance of an Initable from the repository.
|
void |
initClass(String className,
Object data)
Performs early initialization of an Initable class.
|
void |
shutdownClass(String className)
Shuts down an
Initable . |
protected BaseInitableBroker()
public void initClass(String className, Object data) throws InitializationException
initClass
in interface InitableBroker
className
- The name of the class to be initialized.data
- An Object to be used for initialization activities.InitializationException
- Initialization was not successful.public void shutdownClass(String className)
Initable
.
This method is used to release resources allocated by an
Initable
, and return it to its initial (uninitialized)
state.shutdownClass
in interface InitableBroker
className
- The name of the class to be uninitialized.public Initable getInitable(String className) throws InstantiationException
getInitable
in interface InitableBroker
className
- The name of the Initable requested.InstantiationException
- if there was a problem
during instantiation or initialization of the Initable.protected Initable getInitableInstance(String className) throws InstantiationException
className
- The name of the class to be instantiated.InstantiationException
- if the requested class can't
be instantiated.Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.