T - The target typepublic interface Hookable<T>
| Modifier and Type | Method and Description |
|---|---|
void |
cancelled()
The canceled hook, invoked if the action is canceled before or during the
execution of the action.
|
Message |
failed(Throwable cause,
Message message)
The failed hook, invoked if an exception is raised during the execution
of the action.
|
void |
finished()
This finished hook, unconditionally invoked as the last method in an
action life cycle.
|
void |
initialized()
The initialized hook.
|
void |
performed(T result)
The performed hook, invoked after
initialized() unless the
action has failed or the action is canceled. |
void |
succeeded()
The succeeded hook, invoked after
performed(Object) unless the
action failed or the action was canceled. |
@ThreadInfo(value=WORKER) void initialized()
If applicable, this hook is invoked on a dedicated worker thread by
default. Use the annotation ThreadInfo to control which thread
this method is invoked on.
@ThreadInfo(value=WORKER) void performed(T result)
initialized() unless the
action has failed or the action is canceled.
If applicable, this hook is invoked on a dedicated worker thread by
default. Use the annotation ThreadInfo to control which thread
this method is invoked on.
result - The result of invoking the action@ThreadInfo(value=WORKER) void succeeded()
performed(Object) unless the
action failed or the action was canceled.
If applicable, this hook is invoked on a dedicated worker thread by
default. Use the annotation ThreadInfo to control which thread
this method is invoked on.
@ThreadInfo(value=WORKER) Message failed(Throwable cause, Message message)
The returned message will be displayed to the user (null
means no display).
If applicable, this hook is invoked on a dedicated worker thread by
default. Use the annotation ThreadInfo to control which thread
this method is invoked on.
cause - The throwable that caused the execution of the action to
abortmessage - The message object from a previously executed failed hook, or null@ThreadInfo(value=WORKER) void cancelled()
If applicable, this hook is invoked on a dedicated worker thread by
default. Use the annotation ThreadInfo to control which thread
this method is invoked on.
@ThreadInfo(value=WORKER) void finished()
If applicable, this hook is invoked on a dedicated worker thread by
default. Use the annotation ThreadInfo to control which thread
this method is invoked on.
Copyright © 2006–2017 Esito AS. All rights reserved.