ActionHandler
instead.@Deprecated public interface ActionInterceptor
Modifier and Type | Method and Description |
---|---|
void |
after(ActionExecutionStatus status,
GriffonController controller,
String actionName,
Object[] args)
Deprecated.
Called after the action has been aborted or executed, even if an exception
occurred during execution.
|
Object[] |
before(GriffonController controller,
String actionName,
Object[] args)
Deprecated.
Called before an action is executed.
|
void |
configure(GriffonController controller,
String actionName,
Method method)
Deprecated.
Inspect the action during the configuration phase.
|
boolean |
exception(Exception exception,
GriffonController controller,
String actionName,
Object[] args)
Deprecated.
Called after the action has been executed when an exception occurred
during execution.
|
static final String SUFFIX
void configure(@Nonnull GriffonController controller, @Nonnull String actionName, @Nonnull Method method)
before()
, after()
and exception()
.controller
- the controller that owns the actionactionName
- the action's namemethod
- the method that represents the action itself@Nonnull Object[] before(@Nonnull GriffonController controller, @Nonnull String actionName, @Nonnull Object[] args)
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.controller
- the controller that owns the actionactionName
- the action's nameargs
- the action's argumentsAbortActionExecution
- if action execution should be aborted.void after(@Nonnull ActionExecutionStatus status, @Nonnull GriffonController controller, @Nonnull String actionName, @Nonnull Object[] args)
status
- a flag that indicates the execution status of the actioncontroller
- the controller that owns the actionactionName
- the action's nameargs
- the arguments sent to the actionboolean exception(@Nonnull Exception exception, @Nonnull GriffonController controller, @Nonnull String actionName, @Nonnull Object[] args)
exception
- the exception thrown during the action's executioncontroller
- the controller that owns the actionactionName
- the action's nameargs
- the arguments sent to the action during executiontrue
if the exception was handled successfully,
false
otherwise.