org.apache.avalon.fortress.tools
Class FortressBean
java.lang.Object
org.apache.avalon.fortress.tools.FortressBean
- All Implemented Interfaces:
- Disposable, Initializable, LogEnabled, Serviceable
- public class FortressBean
- extends java.lang.Object
- implements Initializable, LogEnabled, Serviceable, Disposable
Bean for making it easier to run Fortress, for example as Ant task.
- Version:
- CVS $Revision: 1.6 $ $Date: 2004/03/02 16:20:41 $
- Author:
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
config
private final FortressConfig config
-
logger
private Logger logger
-
cm
private DefaultContainerManager cm
-
container
private DefaultContainer container
-
sm
private ServiceManager sm
-
lookupComponentRole
private java.lang.String lookupComponentRole
-
invokeMethod
private java.lang.String invokeMethod
-
systemExitOnDispose
private boolean systemExitOnDispose
-
FortressBean
public FortressBean()
enableLogging
public void enableLogging(Logger logger)
- Description copied from interface:
LogEnabled
-
Provide component with a logger.
-
- Specified by:
enableLogging in interface LogEnabled
-
- Parameters:
logger - the logger. Must not be null.
- See Also:
LogEnabled.enableLogging(org.apache.avalon.framework.logger.Logger)
getLogger
protected final Logger getLogger()
-
-
initialize
public void initialize()
throws java.lang.Exception
- Description copied from interface:
Initializable
-
Initialize the component. Initialization includes allocating any resources required throughout the component's lifecycle.
-
- Specified by:
initialize in interface Initializable
-
- Throws:
java.lang.Exception - if an error occurs
- See Also:
Initializable.initialize()
run
public void run()
throws java.lang.Exception
-
-
- Throws:
java.lang.Exception
execute
public void execute()
-
Implementation execute() method for Ant compatability.
-
-
service
public void service(ServiceManager sm)
throws ServiceException
- Description copied from interface:
Serviceable
-
Pass the
ServiceManager to the Serviceable. The Serviceable implementation should use the specified ServiceManager to acquire the components it needs for execution.
-
- Specified by:
service in interface Serviceable
-
- Parameters:
sm - The ServiceManager which this Serviceable uses. Must not be null.
- Throws:
ServiceException - if an error occurs
- See Also:
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)
dispose
public void dispose()
- Description copied from interface:
Disposable
-
The dispose operation is called at the end of a components lifecycle. This method will be called after Startable.stop() method (if implemented by component). Components use this method to release and destroy any resources that the Component owns.
-
- Specified by:
dispose in interface Disposable
-
- See Also:
Disposable.dispose()
getServiceManager
protected ServiceManager getServiceManager()
-
-
setContainerClass
public void setContainerClass(java.lang.String containerClass)
throws java.lang.Exception
-
The container implementation has to be a subclass of
org.apache.avalon.fortress.impl.DefaultContainer.
-
-
- Parameters:
containerClass - fully qualified class name of the container implementation class.
- Throws:
java.lang.Exception
setContainerConfiguration
public void setContainerConfiguration(java.lang.String containerConfiguration)
-
-
setContextDirectory
public void setContextDirectory(java.lang.String contextDirectory)
-
-
setInstrumentManagerConfiguration
public void setInstrumentManagerConfiguration(java.lang.String instrumentManagerConfiguration)
-
-
setLoggerManagerConfiguration
public void setLoggerManagerConfiguration(java.lang.String loggerManagerConfiguration)
-
-
setRoleManagerConfiguration
public void setRoleManagerConfiguration(java.lang.String roleManagerConfiguration)
-
-
setWorkDirectory
public void setWorkDirectory(java.lang.String workDirectory)
-
-
setInvokeMethod
public void setInvokeMethod(java.lang.String invokeMethod)
-
-
setLookupComponentRole
public void setLookupComponentRole(java.lang.String lookupComponentRole)
-
-
setSystemExitOnDispose
public void setSystemExitOnDispose(boolean systemExitOnDispose)
-
Should we call System.exit(0) after we are finished with processing. Useful if the components have a GUI and there are some threads running that do not allow the JVM to exit.
-
-
Please see keelframework.org for information about new Keel releases.