gov.loc.repository.bagit
Interface ProgressListenable


public interface ProgressListenable

Broadcasts progress to interested listeners. This interface is implemented by any components that provide 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.

This interface makes no guarantees about thread safety. It is the responsibility of the listener implementations to ensure that concurrent invocations of the ProgressListener.reportProgress(String, Object, Long, Long) method do not conflict.

See Also:
ProgressListener, LongRunningOperationBase

Method Summary
 void addProgressListener(ProgressListener progressListener)
          Adds a progress listener.
 void removeProgressListener(ProgressListener progressListener)
          Removes a progress listener.
 

Method Detail

addProgressListener

void addProgressListener(ProgressListener progressListener)
Adds a progress listener.

Parameters:
progressListener - The listener to add. Must not be null.

removeProgressListener

void removeProgressListener(ProgressListener progressListener)
Removes a progress listener. If the listener was not previously registered with addProgressListener(ProgressListener), or has already been removed, then nothing happens.

Parameters:
progressListener - The listener to remove. Must not be null.