org.xwiki.gwt.user.client
Class CancelableAsyncCallback<T>
java.lang.Object
org.xwiki.gwt.user.client.CancelableAsyncCallback<T>
- Type Parameters:
T - response data type
- All Implemented Interfaces:
- com.google.gwt.user.client.rpc.AsyncCallback<T>
public class CancelableAsyncCallback<T>
- extends Object
- implements com.google.gwt.user.client.rpc.AsyncCallback<T>
An AsyncCallback that can be canceled before it is called.
- Version:
- $Id: 92b0a4d15f1bffea296cd734c5881c96d22d25b4 $
|
Constructor Summary |
CancelableAsyncCallback(com.google.gwt.user.client.rpc.AsyncCallback<T> callback)
Wraps the given call-back and add the ability to cancel it. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CancelableAsyncCallback
public CancelableAsyncCallback(com.google.gwt.user.client.rpc.AsyncCallback<T> callback)
- Wraps the given call-back and add the ability to cancel it.
- Parameters:
callback - the call-back that might be canceled
onFailure
public void onFailure(Throwable caught)
- Specified by:
onFailure in interface com.google.gwt.user.client.rpc.AsyncCallback<T>
onSuccess
public void onSuccess(T result)
- Specified by:
onSuccess in interface com.google.gwt.user.client.rpc.AsyncCallback<T>
isCanceled
public boolean isCanceled()
- Returns:
true if this call-back is canceled, false otherwise
setCanceled
public void setCanceled(boolean canceled)
- Sets the canceled state of this call-back.
- Parameters:
canceled - true to cancel this call-back, false to reactivate it
Copyright © 2004–2014 XWiki. All rights reserved.