Package org.eclipse.ecf.remoteservice

# Interface IAsyncCallback<ResultType>

public interface IAsyncCallback<ResultType>
Asynchronous callback contract.

Since:
  4.1

## Method Summary

Modifier and Type
Method
Description
`void`
`onFailure(Throwable exception)`
This method will be invoked by an arbitrary thread when an asynchronous remote service call fails.
`void`
`onSuccess(ResultType result)`
This method will be invoked by an arbitrary thread when an asynchronous remote service call is successfully completed.

## Method Details

### onSuccess

void onSuccess(ResultType result)
This method will be invoked by an arbitrary thread when an asynchronous remote service call is successfully completed. Only this method xor `onFailure(Throwable)` will be called for a given remote call.

Parameters:
  `result` - the result of the remote call. May be `null`.

### onFailure

void onFailure(Throwable exception)
This method will be invoked by an arbitrary thread when an asynchronous remote service call fails. Only this method xor `onSuccess(Object)` will be called for a given remote call.

Parameters:
  `exception` - any exception associated with the failure. Will not be `null`.