S
- The type of State.public class BaseStateChanger<S extends State> extends java.lang.Object implements StateChanger<S>
State
. This utility class is
responsible for notifying the change with the StateHandler
,
changing the icon, and persisting the job if necessary.Constructor and Description |
---|
BaseStateChanger(StateHandler<S> stateHandler,
IconHelper iconHelper,
Persistable persistable,
S exceptionState) |
Modifier and Type | Method and Description |
---|---|
void |
setState(S state)
Set the state to given state.
|
void |
setState(S state,
java.util.Date date)
Set the state to the given state with the
given event time.
|
void |
setStateException(java.lang.Throwable t)
Set the state to an EXCEPTION state.
|
void |
setStateException(java.lang.Throwable t,
java.util.Date date)
Set the state to an EXCEPTION state with
the given event time.
|
public BaseStateChanger(StateHandler<S> stateHandler, IconHelper iconHelper, Persistable persistable, S exceptionState)
public void setState(S state)
StateChanger
setState
in interface StateChanger<S extends State>
public void setState(S state, java.util.Date date)
StateChanger
setState
in interface StateChanger<S extends State>
public void setStateException(java.lang.Throwable t)
StateChanger
setStateException
in interface StateChanger<S extends State>
t
- The Exception.public void setStateException(java.lang.Throwable t, java.util.Date date)
StateChanger
setStateException
in interface StateChanger<S extends State>
t
- The Exception.