public class TestLogLevelsCompImpl extends java.lang.Object implements ComponentLifecycle
ComponentImplBase.
Javadoc comments have been removed to keep the
listing for the tutorial shorter.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROP_ASSERTION_MESSAGE |
| Constructor and Description |
|---|
TestLogLevelsCompImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
aboutToAbort()
Called when due to some error condition the component is about to be forcefully removed
some unknown amount of time later (usually not very much...).
|
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. |
int[] |
getLevels() |
void |
initialize(ContainerServices containerServices)
Called to give the component time to initialize itself.
|
void |
logDummyMessages(int[] coreLevels) |
java.lang.String |
name() |
public static final java.lang.String PROP_ASSERTION_MESSAGE
public void initialize(ContainerServices containerServices)
ComponentLifecycle
Called before ComponentLifecycle.execute().
In fact, this method might be called quite some time before functional requests
can be sent to the component.
Must be implemented as a synchronous (blocking) call.
initialize in interface ComponentLifecyclecontainerServices - callback object for services provided by the containerpublic void execute()
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 ComponentLifecyclepublic void cleanUp()
ComponentLifecyclecleanUp in interface ComponentLifecyclepublic void aboutToAbort()
ComponentLifecycleThe component should make an effort to die as neatly as possible.
Because of its urgency, this method will be called asynchronously to the execution of any other method of the component.
aboutToAbort in interface ComponentLifecyclepublic ComponentStates componentState()
public java.lang.String name()
public int[] getLevels()
throws CouldntPerformActionEx
CouldntPerformActionExpublic void logDummyMessages(int[] coreLevels)
throws IllegalArgumentEx
IllegalArgumentExalma.contLogTest.LogLevelsOperations#logDummyMessagesForAllLevels()