public class StateEvent extends Object
Modifier and Type | Class and Description |
---|---|
static class |
StateEvent.SerializableNoSource
Used to persist the event.
|
Modifier and Type | Field and Description |
---|---|
static String |
REPLACEMENT_EXCEPTION_TEXT |
Constructor and Description |
---|
StateEvent(Stateful job,
State jobState)
Constructor.
|
StateEvent(Stateful source,
State state,
Date time,
Throwable exception)
Constructor.
|
StateEvent(Stateful job,
State jobState,
Throwable exception)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Throwable |
getException()
Get the exception if applicable, null otherwise.
|
Stateful |
getSource() |
State |
getState()
Get the job state.
|
Date |
getTime()
Get the time of the event..
|
StateEvent.SerializableNoSource |
serializable()
Provide something that can be serialised.
|
String |
toString()
Override toString.
|
public static final String REPLACEMENT_EXCEPTION_TEXT
public StateEvent(Stateful source, State state, Date time, Throwable exception)
source
- The source of the event.state
- The state.time
- the Time of the event.exception
- The exception if applicable, or null otherwise.public StateEvent(Stateful job, State jobState, Throwable exception)
job
- The source of the event.jobState
- The state.exception
- The exception if applicable, or null otherwise.public Stateful getSource()
public State getState()
public Throwable getException()
public Date getTime()
public StateEvent.SerializableNoSource serializable()
writeReplace
because there the corresponding
readResolve