public class CounterConsumerImpl extends java.lang.Object implements ComponentLifecycle, AcsEventSubscriber.Callback<statusBlockEvent>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROP_ASSERTION_MESSAGE |
| Constructor and Description |
|---|
CounterConsumerImpl() |
| 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. |
void |
getBlocks() |
java.lang.Class<statusBlockEvent> |
getEventType()
This method is needed for adding event-specific subscriptions
and for the type-safety of this API (based on java generics),
and should be implemented like
|
void |
initialize(ContainerServices containerServices)
Called to give the component time to initialize itself.
|
java.lang.String |
name() |
void |
receive(statusBlockEvent someParam,
EventDescription eventDescrip)
NC receiver method.
|
int |
waitTillDone() |
public static final java.lang.String PROP_ASSERTION_MESSAGE
public void initialize(ContainerServices containerServices) throws ComponentLifecycleException
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 containerComponentLifecycleExceptionpublic 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()
throws AcsJComponentCleanUpEx
ComponentLifecyclecleanUp in interface ComponentLifecycleAcsJComponentCleanUpExpublic 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 void receive(statusBlockEvent someParam,
EventDescription eventDescrip)
receive in interface AcsEventSubscriber.Callback<statusBlockEvent>someParam - The event data, e.g. an IDL-defined struct.eventDescrip - Event meta data.public java.lang.Class<statusBlockEvent> getEventType()
AcsEventSubscriber.Callback
public Class<MyEvent> getEventType() {
return MyEvent.class;
}
getEventType in interface AcsEventSubscriber.Callback<statusBlockEvent>public ComponentStates componentState()
public java.lang.String name()
public void getBlocks()
throws CouldntPerformActionEx
CouldntPerformActionExalma.COUNTER.CounterConsumerOperations#getBlocks()public int waitTillDone()
throws CouldntPerformActionEx
CouldntPerformActionExalma.COUNTER.CounterConsumerOperations#waitTillDone()