Interface JmsMatsStartStoppable

All Superinterfaces:
JmsMatsStatics, MatsConfig.StartStoppable
All Known Implementing Classes:
JmsMatsEndpoint, JmsMatsFactory, JmsMatsStage

public interface JmsMatsStartStoppable extends JmsMatsStatics, MatsConfig.StartStoppable
  • Method Details

    • getChildrenStartStoppable

      List<JmsMatsStartStoppable> getChildrenStartStoppable()
      Must be implemented to provide your children.
    • waitForReceiving

      default boolean waitForReceiving(int timeoutMillis)
      Description copied from interface: MatsConfig.StartStoppable
      If the entity is stopped or starting, this method won't return until it has actually started the receive-loop (i.e. that some 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.

      Specified by:
      waitForReceiving in interface MatsConfig.StartStoppable
      Parameters:
      timeoutMillis - number of milliseconds before giving up the wait, returning false. 0 is indefinite wait, negative values are not allowed.
      Returns:
      true if the entity started within the timeout, false if it did not start.
    • stopPhase0_SetRunFlagFalse

      default void stopPhase0_SetRunFlagFalse()
    • stopPhase1_CloseSessionIfInReceive

      default void stopPhase1_CloseSessionIfInReceive()
    • stopPhase2_GracefulWaitAfterRunflagFalse

      default void stopPhase2_GracefulWaitAfterRunflagFalse(int gracefulShutdownMillis)
    • stopPhase3_InterruptIfStillAlive

      default void stopPhase3_InterruptIfStillAlive()
    • stopPhase4_GracefulWaitAfterInterrupt

      default boolean stopPhase4_GracefulWaitAfterInterrupt()
    • stop

      default boolean stop(int gracefulShutdownMillis)
      Description copied from interface: MatsConfig.StartStoppable
      Will stop the entity - or the entities below it (the only "active" entity is a 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

      Specified by:
      stop in interface MatsConfig.StartStoppable
      Parameters:
      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.
      Returns:
      true if the running thread(s) were dead when returning, false otherwise.