public class AbstractActionHandler extends java.lang.Object implements ActionHandler
SUFFIX
Constructor and Description |
---|
AbstractActionHandler() |
Modifier and Type | Method and Description |
---|---|
protected AbortActionExecution |
abortActionExecution() |
java.lang.Object |
after(ActionExecutionStatus status,
Action action,
java.lang.Object[] args,
java.lang.Object result)
Called after the action has been aborted or executed, even if an exception
occurred during execution.
|
java.lang.Object[] |
before(Action action,
java.lang.Object[] args)
Called before an action is executed.
|
void |
configure(Action action,
java.lang.reflect.Method method)
Inspect the action during the configuration phase.
|
boolean |
exception(java.lang.Exception exception,
Action action,
java.lang.Object[] args)
Called after the action has been executed when an exception occurred
during execution.
|
void |
update(Action action)
Update the action's properties.
|
public void update(@Nonnull Action action)
ActionHandler
update
in interface ActionHandler
action
- the action to be updatedpublic void configure(@Nonnull Action action, @Nonnull java.lang.reflect.Method method)
ActionHandler
before()
, after()
and exception()
.configure
in interface ActionHandler
action
- the action to be configuredmethod
- the method that represents the action itself@Nonnull public java.lang.Object[] before(@Nonnull Action action, @Nonnull java.lang.Object[] args)
ActionHandler
AbortActionExecution
in
order to signal that the action should not be invoked. In any case this method
returns the arguments to be sent to the action, thus allowing the interceptor
to modify the arguments as it deem necessary. Failure to return an appropriate
value will most likely cause an error during the action's execution.before
in interface ActionHandler
action
- the action to executeargs
- the action's arguments@Nullable public java.lang.Object after(@Nonnull ActionExecutionStatus status, @Nonnull Action action, @Nonnull java.lang.Object[] args, @Nullable java.lang.Object result)
ActionHandler
after
in interface ActionHandler
status
- a flag that indicates the execution status of the actionaction
- the action to executeargs
- the arguments sent to the actionresult
- the result of executing the actionpublic boolean exception(@Nonnull java.lang.Exception exception, @Nonnull Action action, @Nonnull java.lang.Object[] args)
ActionHandler
exception
in interface ActionHandler
exception
- the exception thrown during the action's executionaction
- the action to executeargs
- the arguments sent to the action during executiontrue
if the exception was handled successfully,
false
otherwise.@Nonnull protected AbortActionExecution abortActionExecution() throws AbortActionExecution
AbortActionExecution