S
- The type of State.public class BaseStateChanger<S extends State> extends 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,
Date date)
Set the state to the given state with the
given event time.
|
void |
setStateException(Throwable t)
Set the state to an EXCEPTION state.
|
void |
setStateException(Throwable t,
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, Date date)
StateChanger
setState
in interface StateChanger<S extends State>
public void setStateException(Throwable t)
StateChanger
setStateException
in interface StateChanger<S extends State>
t
- The Exception.public void setStateException(Throwable t, Date date)
StateChanger
setStateException
in interface StateChanger<S extends State>
t
- The Exception.