20 package net.sf.gridarta.utils;
22 import java.util.Timer;
23 import java.util.TimerTask;
24 import org.jetbrains.annotations.NotNull;
57 private final Timer
timer =
new Timer();
121 public State timeout() {
143 delayedChangeListener.
change();
149 public State timeout() {
151 delayedChangeListener.
change();
177 public State timeout() {
DelayedChangeManager(final int initialDelay, final int notificationDelay, @NotNull final DelayedChangeListener delayedChangeListener)
Creates a new instance.
Helper for reducing the number of change events: calls to change() will be forwarded to DelayedChange...
final State pending
The state "pending" of the FSM.
void finish()
Finishes a series of change events.
State state
The FSM's current state.
void change()
Called for forwarded change events.
A TimerTask that calls State#timeout() when the timer expires.
Listener for forwarded events of DelayedChangeManager.
final DelayedChangeListener delayedChangeListener
The DelayedChangeListener events are forwarded to.
final int initialDelay
The delay in millisecond the first forwarded event is delayed.
final int notificationDelay
The interval in milliseconds events are forwarded during a long series of events. ...
final State wait
The state "wait" of the FSM.
State finish()
Executes the event "finish".
State change()
Executes the event "change".
final Timer timer
The Timer for delaying events.
void change()
Delivers a change event to the associated DelayedChangeListener.
final State idle
The state "idle" of the FSM.
State timeout()
Executes the event "timeout".