public class ComponentImplBase extends java.lang.Object implements ComponentLifecycle
| Modifier and Type | Field and Description |
|---|---|
protected ContainerServices |
m_containerServices
API through which the container explicitly provides various services to its components.
|
protected java.lang.String |
m_instanceName
name of the component instance, which is either given statically in the CDB deployment configuration
or determined right before the instantiation of a dynamic component.
|
protected AcsLogger |
m_logger
Logger to be used by subclass for all application code logging.
|
| Constructor and Description |
|---|
ComponentImplBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
aboutToAbort()
Calls
cleanUp). |
void |
cleanUp()
Called after the last functional call to the component has finished.
|
ComponentStates |
componentState() |
void |
execute()
Called after
ComponentLifecycle.initialize(ContainerServices) to tell the component that it has to be ready to accept
incoming functional calls any time. |
void |
initialize(ContainerServices containerServices)
Subclass must call
super.initialize(containerServices)
unless it overrides as well all other methods which access the member vars of this class. |
java.lang.String |
name() |
protected java.lang.String m_instanceName
m_containerServices.getName().protected ContainerServices m_containerServices
protected AcsLogger m_logger
public void initialize(ContainerServices containerServices) throws ComponentLifecycleException
super.initialize(containerServices)
unless it overrides as well all other methods which access the member vars of this class.initialize in interface ComponentLifecyclecontainerServices - callback object for services provided by the containerComponentLifecycleExceptionComponentLifecycle.initialize(ContainerServices)public void execute()
throws ComponentLifecycleException
ComponentLifecycleComponentLifecycle.initialize(ContainerServices) to tell the component that it has to be ready to accept
incoming functional calls any time.
Examples:
initialize seemed too early
Must be implemented as a synchronous (blocking) call (can spawn threads though).
execute in interface ComponentLifecycleComponentLifecycleExceptionpublic void cleanUp()
throws AcsJComponentCleanUpEx
ComponentLifecyclecleanUp in interface ComponentLifecycleAcsJComponentCleanUpExpublic void aboutToAbort()
cleanUp).
Override this method if the emergency situation of a container/component abort
with unknown remaining lifetime requires a different strategy than the regular clean-up.aboutToAbort in interface ComponentLifecycleComponentLifecycle.aboutToAbort()public ComponentStates componentState()
alma.ACS.ACSComponentOperations#componentState()public java.lang.String name()
alma.ACS.ACSComponentOperations#name()