Package org.oddjob.state
Class ConstStateful
java.lang.Object
org.oddjob.state.ConstStateful
- All Implemented Interfaces:
Stateful
A Stateful with just one State.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddStateListener(StateListener listener) Add a job state listener.static ConstStatefulatInstant(Object source, State state, StateInstant instant) static StateEventstatic StateEventstatic ConstStatefulexceptionAtInstant(Object source, State state, StateInstant instant, Throwable exception) static ConstStatefulexceptionNow(Object source, State state, Throwable exception) Get the last state event.static ConstStatefulvoidremoveStateListener(StateListener listener) Remove a job state listener.toString()
-
Method Details
-
atInstant
-
now
-
exceptionAtInstant
public static ConstStateful exceptionAtInstant(Object source, State state, StateInstant instant, Throwable exception) -
exceptionNow
-
event
-
exception
-
addStateListener
Description copied from interface:StatefulAdd a job state listener.- Specified by:
addStateListenerin interfaceStateful- Parameters:
listener- The listener.- Throws:
JobDestroyedException
-
removeStateListener
Description copied from interface:StatefulRemove a job state listener.- Specified by:
removeStateListenerin interfaceStateful- Parameters:
listener- The listener.
-
lastStateEvent
Description copied from interface:StatefulGet the last state event.- Specified by:
lastStateEventin interfaceStateful- Returns:
- The last State Event
-
toString
-