A - action class.R - result class.public interface Interceptor<A,R>
| Modifier and Type | Method and Description |
|---|---|
boolean |
canExecute(TypedAction action)
Ensures this intercepted call can be executed.
|
DispatchRequest |
execute(A action,
AsyncCallback<R> resultCallback,
ExecuteCommand<A,R> executeCommand)
Handles the specified action.
|
Class<A> |
getActionType() |
DispatchRequest execute(A action, AsyncCallback<R> resultCallback, ExecuteCommand<A,R> executeCommand)
DelegatingDispatchRequest#isPending() against the request parameter.action - The action to execute.resultCallback - The callback to use to communicate the result of the action. Unless the request is
cancelled, you must invoke AsyncCallback.onSuccess(Object) on this callback once you have obtained the
result. If any failure occurs call AsyncCallback.onFailure(Throwable).executeCommand - Call ExecuteCommand.execute(Object, AsyncCallback) on this object to send the
action over to the server. As a parameter you can pass resultCallback or your custom AsyncCallback if you want to process the result.DispatchRequest object. Never return null, instead return a new CompletedDispatchRequest if you executed, cancelled or
ignored the action.boolean canExecute(TypedAction action)
action - the action to test against.Copyright © 2010–2015 Arcbees. All rights reserved.