クラス TimerTrigger<S,E>

java.lang.ObjectSE
org.springframework.statemachine.support.LifecycleObjectSupport
org.springframework.statemachine.trigger.TimerTrigger<S,E>
型パラメーター:
S - 状態の型
E - イベントの型
実装されたすべてのインターフェース:
org.springframework.beans.factory.Awareorg.springframework.beans.factory.BeanFactoryAwareorg.springframework.beans.factory.DisposableBeanorg.springframework.beans.factory.InitializingBeanorg.springframework.context.Lifecycleorg.springframework.context.Phasedorg.springframework.context.SmartLifecycleStateMachineReactiveLifecycleTrigger<S,E>

public class TimerTrigger<S,E> extends LifecycleObjectSupport implements Trigger<S,E>
静的期間で起動できる Trigger の実装。
作成者:
Janne Valkealahti
  • コンストラクターの詳細

    • TimerTrigger

      public TimerTrigger(long period)
      新しいタイマートリガーをインスタンス化します。
      パラメーター:
      period - ミリ秒単位の期間
    • TimerTrigger

      public TimerTrigger(long period, int count)
      新しいタイマートリガーをインスタンス化します。
      パラメーター:
      period - 期間
      count - カウント
  • メソッドの詳細

    • getPeriod

      public long getPeriod()
    • getCount

      public int getCount()
    • evaluate

      public reactor.core.publisher.Mono<BooleanSE> evaluate(TriggerContext<S,E> context)
      インターフェースからコピーされた説明: Trigger
      トリガーを評価します。
      次で指定:
      インターフェース Trigger<S,E>evaluate 
      パラメーター:
      context - コンテキスト
      戻り値:
      トリガーが起動された場合は true、それ以外の場合は false で完了する Mono
    • addTriggerListener

      public void addTriggerListener(TriggerListener listener)
      インターフェースからコピーされた説明: Trigger
      トリガーリスナーを追加します。
      次で指定:
      インターフェース Trigger<S,E>addTriggerListener 
      パラメーター:
      listener - リスナー
    • getEvent

      public E getEvent()
      インターフェースからコピーされた説明: Trigger
      このトリガーに関連付けられたイベントを取得します。イベントの関連付けがない可能性があります。
      次で指定:
      インターフェース Trigger<S,E>getEvent 
      戻り値:
      行事
    • doPreStartReactively

      protected reactor.core.publisher.Mono<VoidSE> doPreStartReactively()
      クラスからコピーされた説明: LifecycleObjectSupport
      サブクラスは、開始前のロジック用にこれを実装できます。
      オーバーライド:
      クラス LifecycleObjectSupportdoPreStartReactively 
      戻り値:
      mono で完成
    • doPreStopReactively

      protected reactor.core.publisher.Mono<VoidSE> doPreStopReactively()
      クラスからコピーされた説明: LifecycleObjectSupport
      サブクラスは、停止前ロジックのためにこれを実装できます。
      オーバーライド:
      クラス LifecycleObjectSupportdoPreStopReactively 
      戻り値:
      mono で完成
    • arm

      public void arm()
      インターフェースからコピーされた説明: Trigger
      トリガーを準備します。トリガーが装備された後、TriggerListener はイベントを受信する場合があります。
      次で指定:
      インターフェース Trigger<S,E>arm 
    • disarm

      public void disarm()
      インターフェースからコピーされた説明: Trigger
      トリガーを武装解除します。トリガーが解除された後、TriggerListener はイベントを受信しません。
      次で指定:
      インターフェース Trigger<S,E>disarm