public interface JmsMatsStartStoppable extends JmsMatsStatics, MatsConfig.StartStoppable
EXTRA_GRACE_MILLIS, ILLEGAL_CALL_FLOWS, JMS_MSG_PROP_AUDIT, JMS_MSG_PROP_DISPATCH_TYPE, JMS_MSG_PROP_FROM, JMS_MSG_PROP_INITIALIZING_APP, JMS_MSG_PROP_INITIATOR_ID, JMS_MSG_PROP_MATS_MESSAGE_ID, JMS_MSG_PROP_MESSAGE_TYPE, JMS_MSG_PROP_TO, JMS_MSG_PROP_TRACE_ID, LOG_PREFIX, MAX_STACK_HEIGHT, MAX_TOTAL_CALL_NUMBER, MDC_MATS_APP_NAME, MDC_MATS_APP_VERSION, MDC_MATS_CALL_NUMBER, MDC_MATS_IN_MESSAGE_SYSTEM_ID, MDC_MATS_INIT, MDC_MATS_OUT_MATS_MESSAGE_ID, MDC_MATS_STAGE, MDC_MATS_STAGE_ID, MDC_TRACE_ID, NO_INVOCATION_POINT, RANDOM_ALPHABET, THREAD_PREFIX, TOTAL_JMS_MSG_PROPS_SIZE
Modifier and Type | Method and Description |
---|---|
java.util.List<JmsMatsStartStoppable> |
getChildrenStartStoppable()
Must be implemented to provide your children.
|
default boolean |
stop(int gracefulShutdownMillis)
Will stop the entity - or the entities below it (the only "active" entity is a
MatsStage Processor). |
default void |
stopPhase0_SetRunFlagFalse() |
default void |
stopPhase1_CloseSessionIfInReceive() |
default void |
stopPhase2_GracefulWaitAfterRunflagFalse(int gracefulShutdownMillis) |
default void |
stopPhase3_InterruptIfStillAlive() |
default boolean |
stopPhase4_GracefulWaitAfterInterrupt() |
default boolean |
waitForReceiving(int timeoutMillis)
If the entity is stopped or starting, this method won't return until it has actually started the receive-loop
(i.e.
|
createFlowId, getInvocationPoint, handleIncomingMessageMatsObject, handleIncomingState, id, id, idThis, ms3, produceAndSendMsgSysMessages, randomString, setConcurrencyWithLog, stageOrInit
start
java.util.List<JmsMatsStartStoppable> getChildrenStartStoppable()
default boolean waitForReceiving(int timeoutMillis)
MatsConfig.StartStoppable
MatsStage
Processor has actually entered its receive-loop, consuming messages). If
the entity has already gotten into the receive loop, the method immediately returns.
Note: Currently, this only holds for the initial start. If the entity has started the receive-loop at some
point, it will always immediately return - even though it is currently stopped.
Further documentation on extensions.waitForReceiving
in interface MatsConfig.StartStoppable
timeoutMillis
- number of milliseconds before giving up the wait, returning false
. 0 is indefinite
wait, negative values are not allowed.true
if the entity started within the timeout, false
if it did not start.default void stopPhase0_SetRunFlagFalse()
default void stopPhase1_CloseSessionIfInReceive()
default void stopPhase2_GracefulWaitAfterRunflagFalse(int gracefulShutdownMillis)
default void stopPhase3_InterruptIfStillAlive()
default boolean stopPhase4_GracefulWaitAfterInterrupt()
default boolean stop(int gracefulShutdownMillis)
MatsConfig.StartStoppable
MatsStage
Processor).
This method is idempotent, calling it when the entity is already stopped has no effect.
Further documentation on extensions - note the special semantics for MatsFactory
stop
in interface MatsConfig.StartStoppable
gracefulShutdownMillis
- number of milliseconds to let the stage processors wait after having asked for them to shut down,
and interrupting them if they have not shut down yet.true
if the running thread(s) were dead when returning, false
otherwise.