Package cn.mapway.ui.client.event
Class AsyncCallbackLambda<T>
- java.lang.Object
-
- cn.mapway.ui.client.event.AsyncCallbackLambda<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
IServerCallback<T>,com.google.gwt.user.client.rpc.AsyncCallback<T>
public abstract class AsyncCallbackLambda<T> extends Object implements com.google.gwt.user.client.rpc.AsyncCallback<T>, IServerCallback<T>
将服务器的回调接口转化为 单一的函数式 用于简单的Lambda方式书写回调
-
-
Constructor Summary
Constructors Constructor Description AsyncCallbackLambda()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidonFailure(Throwable caught)abstract voidonResult(T data)这个方法子类实现voidonSuccess(T result)
-
-
-
Method Detail
-
onFailure
public void onFailure(Throwable caught)
- Specified by:
onFailurein interfacecom.google.gwt.user.client.rpc.AsyncCallback<T>
-
onSuccess
public void onSuccess(T result)
- Specified by:
onSuccessin interfacecom.google.gwt.user.client.rpc.AsyncCallback<T>
-
onResult
public abstract void onResult(T data)
这个方法子类实现- Specified by:
onResultin interfaceIServerCallback<T>- Parameters:
data-
-
-