Package org.apache.thrift.async
Interface AsyncMethodCallback<T>
-
- Type Parameters:
T
- The return type of the asynchronously invoked method.
public interface AsyncMethodCallback<T>
A handler interface asynchronous clients can implement to receive future notice of the results of an asynchronous method call.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onComplete(T response)
This method will be called when the remote side has completed invoking your method call and the result is fully read.void
onError(java.lang.Exception exception)
This method will be called when there is either an unexpected client-side exception like an IOException or else when the remote method raises an exception, either declared in the IDL or due to an unexpected server-side error.
-
-
-
Method Detail
-
onComplete
void onComplete(T response)
This method will be called when the remote side has completed invoking your method call and the result is fully read. Foroneway
method calls, this method will be called as soon as we have completed writing out the request.- Parameters:
response
- The return value of the asynchronously invoked method;null
for void methods which includesoneway
methods.
-
onError
void onError(java.lang.Exception exception)
This method will be called when there is either an unexpected client-side exception like an IOException or else when the remote method raises an exception, either declared in the IDL or due to an unexpected server-side error.- Parameters:
exception
- The exception encountered processing the the asynchronous method call, may be a local exception or an unmarshalled remote exception.
-
-