R
- The type of the AsyncCallback
.public class DefaultCallbackDispatchRequest<R> extends Object implements CallbackDispatchRequest<R>
CallbackDispatchRequest
that should be used by
ClientActionHandler
s that make asynchronous calls that do not
return a Request
.
isPending()
will return true until either onSuccess(Object)
or onFailure(java.lang.Throwable)
is called.
Calling cancel()
will prevent the onSuccess(Object)
and onFailure(Throwable)
from being
forwarded to the code that requested the action handler be executed/undone.Constructor and Description |
---|
DefaultCallbackDispatchRequest(AsyncCallback<R> callback)
Construct a
DefaultCallbackDispatchRequest . |
public DefaultCallbackDispatchRequest(AsyncCallback<R> callback)
DefaultCallbackDispatchRequest
. See the class documentation for details.callback
- The resultCallback
parameter passed to
ClientActionHandler#execute()
or the callback parameter passed to
ClientActionHandler#undo()
public void cancel()
cancel
in interface DispatchRequest
public boolean isPending()
isPending
in interface DispatchRequest
public void onFailure(Throwable caught)
onFailure
in interface AsyncCallback<R>
public void onSuccess(R result)
onSuccess
in interface AsyncCallback<R>
Copyright © 2010–2014 Arcbees. All rights reserved.