net.netheos.pcsapi.bytesio
Class StdoutProgressListener

java.lang.Object
  extended by net.netheos.pcsapi.bytesio.StdoutProgressListener
All Implemented Interfaces:
ProgressListener

public class StdoutProgressListener
extends Object
implements ProgressListener

A simple progress listener that outputs to stdout.


Constructor Summary
StdoutProgressListener()
           
 
Method Summary
 void aborted()
          Called when current operation is aborted (may be retried)
 long getCurrent()
           
 long getTotal()
           
 boolean isAborted()
          Indicates if the progress has been aborted
 void progress(long current)
          Called when observed lengthly operation has made some progress.
 void setProgressTotal(long total)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StdoutProgressListener

public StdoutProgressListener()
Method Detail

setProgressTotal

public void setProgressTotal(long total)
Specified by:
setProgressTotal in interface ProgressListener
Parameters:
total - total elements

progress

public void progress(long current)
Description copied from interface: ProgressListener
Called when observed lengthly operation has made some progress.

Called once with current=0 to indicate process is starting. Note that progress may restart from 0 (in case an upload or download fails and is restarted).

Specified by:
progress in interface ProgressListener
Parameters:
current - current of elements passed so far

aborted

public void aborted()
Description copied from interface: ProgressListener
Called when current operation is aborted (may be retried)

Specified by:
aborted in interface ProgressListener

isAborted

public boolean isAborted()
Indicates if the progress has been aborted

Returns:
true if aborted, false otherwise

getTotal

public long getTotal()

getCurrent

public long getCurrent()


Copyright © 2014. All Rights Reserved.