GWTP Dispatch client 0.6-redhat-1

com.gwtplatform.dispatch.client
Class DefaultCallbackDispatchRequest<R>

java.lang.Object
  extended by 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 ClientActionHandlers 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

Constructor Summary
DefaultCallbackDispatchRequest(com.google.gwt.user.client.rpc.AsyncCallback<R> callback)
          Construct a DefaultCallbackDispatchRequest.
 
Method Summary
 void cancel()
           
 boolean isPending()
           
 void onFailure(Throwable caught)
           
 void onSuccess(R result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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()
Method Detail

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>

GWTP Dispatch client 0.6-redhat-1

Copyright © 2010-2012 ArcBees. All Rights Reserved.