Constructor and Description |
---|
RunnableAction(java.lang.Runnable runnable)
Instantiates a new runnable action.
|
RunnableAction(java.lang.Runnable runnable,
java.lang.String id)
Instantiates a new runnable action.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(StateContext<java.lang.String,java.lang.String> context)
Execute action with a
StateContext . |
java.lang.String |
getId() |
protected void |
onError(java.lang.String id,
StateContext<java.lang.String,java.lang.String> context,
java.lang.Exception e) |
protected void |
onPostExecute(java.lang.String id,
StateContext<java.lang.String,java.lang.String> context) |
protected void |
onPreExecute(java.lang.String id,
StateContext<java.lang.String,java.lang.String> context) |
protected void |
onSuccess(java.lang.String id,
StateContext<java.lang.String,java.lang.String> context) |
protected boolean |
shouldExecute(java.lang.String id,
StateContext<java.lang.String,java.lang.String> context) |
public RunnableAction(java.lang.Runnable runnable)
runnable
- the runnablepublic RunnableAction(java.lang.Runnable runnable, java.lang.String id)
runnable
- the runnableid
- the optional id for loggingpublic final void execute(StateContext<java.lang.String,java.lang.String> context)
Action
StateContext
.public java.lang.String getId()
protected boolean shouldExecute(java.lang.String id, StateContext<java.lang.String,java.lang.String> context)
protected void onPreExecute(java.lang.String id, StateContext<java.lang.String,java.lang.String> context)
protected void onPostExecute(java.lang.String id, StateContext<java.lang.String,java.lang.String> context)
protected void onSuccess(java.lang.String id, StateContext<java.lang.String,java.lang.String> context)
protected void onError(java.lang.String id, StateContext<java.lang.String,java.lang.String> context, java.lang.Exception e)