A
- the TypedAction
type.R
- the result type for this action.public class DelegatingAsyncCallback<A extends TypedAction<R>,R> extends Object implements AsyncCallback<ClientActionHandler<?,?>>, ExecuteCommand<A,R>
AsyncCallback
implementation wrapping another AsyncCallback
object used by a
ClientActionHandler
to delegate the execution result.Constructor and Description |
---|
DelegatingAsyncCallback(DispatchCall dispatchCall,
A action,
AsyncCallback<R> callback,
DelegatingDispatchRequest dispatchRequest) |
Modifier and Type | Method and Description |
---|---|
DispatchRequest |
execute(A action,
AsyncCallback<R> resultCallback)
Execute an action.
|
void |
onFailure(Throwable caught) |
void |
onSuccess(ClientActionHandler<?,?> clientActionHandler) |
public DelegatingAsyncCallback(DispatchCall dispatchCall, A action, AsyncCallback<R> callback, DelegatingDispatchRequest dispatchRequest)
public void onSuccess(ClientActionHandler<?,?> clientActionHandler)
onSuccess
in interface AsyncCallback<ClientActionHandler<?,?>>
public void onFailure(Throwable caught)
onFailure
in interface AsyncCallback<ClientActionHandler<?,?>>
public DispatchRequest execute(A action, AsyncCallback<R> resultCallback)
ExecuteCommand
execute
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
.Copyright © 2010–2014 Arcbees. All rights reserved.