public class CounterSupplierImpl extends java.lang.Object implements ComponentLifecycle
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROP_ASSERTION_MESSAGE |
| Constructor and Description |
|---|
CounterSupplierImpl() |
| 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 |
initialize(ContainerServices containerServices)
Called to give the component time to initialize itself.
|
java.lang.String |
name() |
int |
sendBlocks(int initVal,
int lastVal,
int changeVal,
float period) |
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()
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 ComponentStates componentState()
public java.lang.String name()
public int sendBlocks(int initVal,
int lastVal,
int changeVal,
float period)
throws CouldntPerformActionEx
CouldntPerformActionExalma.COUNTER.CounterConsumerOperations#getBlocks()