|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.excalibur.component.ExcaliburComponentManagerCreator
Utility class which can be used to manage the life cycle of a ComponentManager and its RoleManager, LoggerManager, and optional InstrumentManager.
The code necessary to manage all of the above can be reduced to the following:
m_componentManagerCreator = new ExcaliburComponentManagerCreator( null, // Optional Context new File( "../conf/logkit.xml" ), new File( "../conf/roles.xml" ), new File( "../conf/components.xml"), new File( "../conf/instrument.xml" ) );Then simply remember to dispose of the creator when the application shuts down.
m_componentManagerCreator.dispose(); m_componentManagerCreator = null;The ServiceManager (ComponentManager) or any of the other managers can be accessed using their getter methods. getServiceManager() for example. Note that while the ComponentManager is still available, it has been deprecated in favor of the ServiceManager interface.
Constructor Summary | |
ExcaliburComponentManagerCreator(Context context,
Configuration loggerManagerConfig,
Configuration roleManagerConfig,
Configuration componentManagerConfig,
Configuration instrumentManagerConfig)
Deprecated. Create a new ExcaliburComponentManagerCreator using Configuration objects. |
|
ExcaliburComponentManagerCreator(Context context,
java.io.File loggerManagerConfigFile,
java.io.File roleManagerConfigFile,
java.io.File componentManagerConfigFile,
java.io.File instrumentManagerConfigFile)
Deprecated. Create a new ExcaliburComponentManagerCreator using Files. |
|
ExcaliburComponentManagerCreator(Context context,
java.io.InputStream loggerManagerConfigStream,
java.io.InputStream roleManagerConfigStream,
java.io.InputStream componentManagerConfigStream,
java.io.InputStream instrumentManagerConfigStream)
Deprecated. Create a new ExcaliburComponentManagerCreator using Input Streams. |
Method Summary | |
void |
dispose()
Deprecated. Disposes the component manager creator along with the CompoentManager and other managers which it was responsible for creating. |
ComponentManager |
getComponentManager()
Deprecated. The ComponentManager interface has been deprecated. Please use the getServiceManager method. |
InstrumentManager |
getInstrumentManager()
Deprecated. Returns the configured InstrumentManager. |
LoggerManager |
getLoggerManager()
Deprecated. Returns the configured LoggerManager. |
ServiceManager |
getServiceManager()
Deprecated. Returns the configured ServiceManager. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ExcaliburComponentManagerCreator(Context context, Configuration loggerManagerConfig, Configuration roleManagerConfig, Configuration componentManagerConfig, Configuration instrumentManagerConfig) throws java.lang.Exception
context
- Context to use when creating the ComponentManager. May
be null.loggerManagerConfig
- Configuration object to use to create a
LoggerManager.roleManagerConfig
- Configuration object to use to create a
RoleManager.componentManagerConfig
- Configuration object to use to create a
ComponentManager.instrumentManagerConfig
- Configuration object to use to create an
InstrumentManager. May be null.
java.lang.Exception
- If there were any problems initializing the
ComponentManager.public ExcaliburComponentManagerCreator(Context context, java.io.InputStream loggerManagerConfigStream, java.io.InputStream roleManagerConfigStream, java.io.InputStream componentManagerConfigStream, java.io.InputStream instrumentManagerConfigStream) throws java.lang.Exception
context
- Context to use when creating the ComponentManager. May
be null.loggerManagerConfigStream
- InputStream from which to read the
Configuration object to use to create
a LoggerManager.roleManagerConfigStream
- InputStream from which to read the
Configuration object to use to create
a RoleManager.componentManagerConfigStream
- InputStream from which to read the
Configuration object to use to
create a ComponentManager.instrumentManagerConfigStream
- InputStream from which to read the
Configuration object to use to
create a InstrumentManager. May
be null.
java.lang.Exception
- If there were any problems initializing the
ComponentManager.public ExcaliburComponentManagerCreator(Context context, java.io.File loggerManagerConfigFile, java.io.File roleManagerConfigFile, java.io.File componentManagerConfigFile, java.io.File instrumentManagerConfigFile) throws java.lang.Exception
context
- Context to use when creating the ComponentManager. May
be null.loggerManagerConfigFile
- File from which to read the
Configuration object to use to create
a LoggerManager.roleManagerConfigFile
- File from which to read the Configuration
object to use to create a RoleManager.componentManagerConfigFile
- File from which to read the
Configuration object to use to
create a ComponentManager.instrumentManagerConfigFile
- File from which to read the
Configuration object to use to
create a InstrumentManager. May
be null.
java.lang.Exception
- If there were any problems initializing the
ComponentManager.Method Detail |
public void dispose()
dispose
in interface Disposable
public LoggerManager getLoggerManager()
public InstrumentManager getInstrumentManager()
public ComponentManager getComponentManager()
public ServiceManager getServiceManager()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |