org.eclipse.jgit.storage.dht
Interface AsyncCallback<T>

Type Parameters:
T - type of object returned from the operation on success.
All Known Subinterfaces:
StreamingCallback<T>
All Known Implementing Classes:
Sync

public interface AsyncCallback<T>

Receives notification when an asynchronous operation has finished.

Many storage provider interface operations use this type to signal completion or failure status of an operation that runs asynchronously to the caller.

Only one of onSuccess(Object) or onFailure(DhtException) should be invoked.


Method Summary
 void onFailure(DhtException error)
          Notification the operation failed.
 void onSuccess(T result)
          Notification the operation completed.
 

Method Detail

onSuccess

void onSuccess(T result)
Notification the operation completed.

Parameters:
result - the result value from the operation.

onFailure

void onFailure(DhtException error)
Notification the operation failed.

Parameters:
error - a description of the error.


Copyright © 2011. All Rights Reserved.