|
KIE Internal 6.1.0.CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CommandCallback
CommandCallback represents logic that shall be executed after command invocation.
Depending on the result of invocation either onCommandDone or onCommandError will be called.
Important note about implementations is that it shall always be possible to be initialized with default constructor
as executor service is an async component so it will initialize the command on demand using reflection.
In case there is a heavy logic on initialization it should be placed in another service implementation that
can be looked up from within command.
| Method Summary | |
|---|---|
void |
onCommandDone(CommandContext ctx,
ExecutionResults results)
Executed as soon as command is executed successfully. |
void |
onCommandError(CommandContext ctx,
Throwable exception)
Executed only when command failed and all possible retries were already invoked. |
| Method Detail |
|---|
void onCommandDone(CommandContext ctx,
ExecutionResults results)
ctx - - contextual data given by the executor serviceresults - - result produced by command
void onCommandError(CommandContext ctx,
Throwable exception)
ctx - - contextual data given by the executor serviceexception - - exception that was thrown on last attempt to execute command
|
KIE Internal 6.1.0.CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||