com.gwtplatform.dispatch.client
Class DefaultCallbackDispatchRequest<R>
java.lang.Object
com.gwtplatform.dispatch.client.DefaultCallbackDispatchRequest<R>
- Type Parameters:
R
- The type of the AsyncCallback
.
- All Implemented Interfaces:
- com.google.gwt.user.client.rpc.AsyncCallback<R>, CallbackDispatchRequest<R>, DispatchRequest
public class DefaultCallbackDispatchRequest<R>
- extends Object
- implements CallbackDispatchRequest<R>
An implementation of 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.
- Author:
- Brendan Doherty
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultCallbackDispatchRequest
public DefaultCallbackDispatchRequest(com.google.gwt.user.client.rpc.AsyncCallback<R> callback)
- Construct a
DefaultCallbackDispatchRequest
. See the class documentation
for details.
- Parameters:
callback
- The resultCallback parameter passed to
ClientActionHandler#execute()
or the callback parameter passed to
ClientActionHandler#undo()
cancel
public void cancel()
- Specified by:
cancel
in interface DispatchRequest
isPending
public boolean isPending()
- Specified by:
isPending
in interface DispatchRequest
onFailure
public void onFailure(Throwable caught)
- Specified by:
onFailure
in interface com.google.gwt.user.client.rpc.AsyncCallback<R>
onSuccess
public void onSuccess(R result)
- Specified by:
onSuccess
in interface com.google.gwt.user.client.rpc.AsyncCallback<R>
Copyright © 2010-2013 JBoss by Red Hat. All Rights Reserved.