org.xwiki.gwt.user.client
Class NativeAsyncCallback<T>

java.lang.Object
  extended by org.xwiki.gwt.user.client.NativeAsyncCallback<T>
Type Parameters:
T - The type of the return value that was declared in the synchronous version of the method. If the return type is a primitive, use the boxed version of that primitive (for example, an int return type becomes an Integer type argument, and a void return type becomes a Void type argument, which is always null).
All Implemented Interfaces:
com.google.gwt.user.client.rpc.AsyncCallback<T>

public class NativeAsyncCallback<T>
extends java.lang.Object
implements com.google.gwt.user.client.rpc.AsyncCallback<T>

Version:
$Id: NativeAsyncCallback.java 24888 2009-11-06 02:16:19Z sdumitriu $

Constructor Summary
NativeAsyncCallback(JavaScriptObject onSuccess, JavaScriptObject onFailure)
          Creates a new native AsyncCallback by wrapping the given JavaScript functions.
 
Method Summary
 void onFailure(java.lang.Throwable caught)
          
 void onSuccess(T result)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeAsyncCallback

public NativeAsyncCallback(JavaScriptObject onSuccess,
                           JavaScriptObject onFailure)
Creates a new native AsyncCallback by wrapping the given JavaScript functions.

Parameters:
onSuccess - the JavaScript function to call on success
onFailure - the JavaScript function to call on failure
Method Detail

onFailure

public void onFailure(java.lang.Throwable caught)

Specified by:
onFailure in interface com.google.gwt.user.client.rpc.AsyncCallback<T>
See Also:
AsyncCallback.onFailure(Throwable)

onSuccess

public void onSuccess(T result)

Specified by:
onSuccess in interface com.google.gwt.user.client.rpc.AsyncCallback<T>
See Also:
AsyncCallback.onSuccess(Object)


Copyright © 2004-2010 XWiki. All Rights Reserved.