gov.loc.repository.bagit
Interface ProgressListener


public interface ProgressListener

Receives progress reports from other components. This interface is implemented by any components that receive progress updates during a potentially long-running operation.

To receive progress updates, pass an implementation of the the ProgressListener interface to the #addProgressListener(ProgressListener) method. If you no longer wish to receive updates, object may be passed to the #removeProgressListener(ProgressListener) method.

It is the responsibility of the listener implementations to ensure that concurrent invocations of the reportProgress(String, Object, Long, Long) method are thread-safe.

See Also:
ProgressListenable, LongRunningOperationBase

Method Summary
 void reportProgress(java.lang.String activity, java.lang.Object item, java.lang.Long count, java.lang.Long total)
          Receives a progress report.
 

Method Detail

reportProgress

void reportProgress(java.lang.String activity,
                    java.lang.Object item,
                    java.lang.Long count,
                    java.lang.Long total)
Receives a progress report.

Parameters:
activity - Describes the current activity of the operation. Will never be null.
item - The item currently being processed. May be null.
count - The index of the current item being processed. May be null.
total - The total number of items to be processed. May be null.