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

Type Parameters:
T - type of object returned from the operation on success.
All Superinterfaces:
AsyncCallback<T>

public interface StreamingCallback<T>
extends AsyncCallback<T>

Extension of AsyncCallback supporting partial results.

Instead of buffering all results for AsyncCallback.onSuccess(Object), the storage provider may choose to offer some results earlier by invoking the onPartialResult(Object) method declared in this interface.

If any results were delivered early to onPartialResult(Object) then AsyncCallback.onSuccess(Object) is invoked with null when all results have been supplied and no more remain to be delivered.

If an error occurs, AsyncCallback.onFailure(DhtException) will be invoked, potentially after one or more onPartialResult(Object) notifications were already made. In an error condition, AsyncCallback.onSuccess(Object) will not be invoked.


Method Summary
 void onPartialResult(T result)
          Receives partial results from the operation.
 
Methods inherited from interface org.eclipse.jgit.storage.dht.AsyncCallback
onFailure, onSuccess
 

Method Detail

onPartialResult

void onPartialResult(T result)
Receives partial results from the operation.

Parameters:
result - the result value from the operation.


Copyright © 2011. All Rights Reserved.