A - the TypedAction type.R - the result type for this action.T - the interceptor type used.public abstract class DelegatingAsyncCallback<A extends TypedAction<R>,R,T extends Interceptor> extends Object implements AsyncCallback<T>, ExecuteCommand<A,R>
AsyncCallback implementation wrapping another AsyncCallback object used by a Interceptor
implementations to delegate the execution result.| Constructor and Description |
|---|
DelegatingAsyncCallback(DispatchCall<A,R> dispatchCall,
A action,
AsyncCallback<R> callback,
DelegatingDispatchRequest dispatchRequest) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
delegateExecute(Interceptor interceptor) |
protected void |
delegateFailure(Interceptor interceptor) |
DispatchRequest |
execute(A action,
AsyncCallback<R> resultCallback)
Execute an action.
|
protected TypedAction |
getAction() |
protected DelegatingDispatchRequest |
getDispatchRequest() |
void |
onFailure(Throwable caught) |
void |
onSuccess(T interceptor) |
public DelegatingAsyncCallback(DispatchCall<A,R> dispatchCall, A action, AsyncCallback<R> callback, DelegatingDispatchRequest dispatchRequest)
public void onSuccess(T interceptor)
onSuccess in interface AsyncCallback<T extends Interceptor>public void onFailure(Throwable caught)
onFailure in interface AsyncCallback<T extends Interceptor>public DispatchRequest execute(A action, AsyncCallback<R> resultCallback)
ExecuteCommandexecute in interface ExecuteCommand<A extends TypedAction<R>,R>action - The action to execute.resultCallback - A callback that will be invoked once the action has been executed, successfully or not.DispatchRequest representing the request, it should never be null.protected void delegateFailure(Interceptor interceptor)
protected void delegateExecute(Interceptor interceptor)
protected DelegatingDispatchRequest getDispatchRequest()
protected TypedAction getAction()
Copyright © 2010–2015 Arcbees. All rights reserved.