net.sf.mmm.util.io.base
Class StreamUtilImpl.AbstractAsyncTransferrer

java.lang.Object
  extended by net.sf.mmm.util.io.base.StreamUtilImpl.AbstractAsyncTransferrer
All Implemented Interfaces:
Callable<Long>, Stoppable
Direct Known Subclasses:
StreamUtilImpl.BaseTransferrer
Enclosing class:
StreamUtilImpl

protected abstract static class StreamUtilImpl.AbstractAsyncTransferrer
extends Object
implements Callable<Long>, Stoppable

This is the abstract base class for the Callable that transfers data of streams or readers/writers.


Field Summary
private  boolean completed
           
private  boolean stopped
           
 
Constructor Summary
protected StreamUtilImpl.AbstractAsyncTransferrer()
           
 
Method Summary
 boolean isCompleted()
          This method determines if the transfer has been completed successfully.
 boolean isStopped()
          This method determines if this transferrer was stopped.
protected  void setCompleted()
          This method sets the completed-flag.
 void stop()
          This method stops the task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.concurrent.Callable
call
 

Field Detail

stopped

private volatile boolean stopped
See Also:
stop()

completed

private volatile boolean completed
See Also:
isCompleted()
Constructor Detail

StreamUtilImpl.AbstractAsyncTransferrer

protected StreamUtilImpl.AbstractAsyncTransferrer()
Method Detail

stop

public void stop()
This method stops the task.

Specified by:
stop in interface Stoppable

isStopped

public final boolean isStopped()
This method determines if this transferrer was stopped.

Returns:
true if stopped, false otherwise.

isCompleted

public final boolean isCompleted()
This method determines if the transfer has been completed successfully.

Returns:
true if successfully completed, false if still running, stopped or an exception occurred.

setCompleted

protected void setCompleted()
This method sets the completed-flag.



Copyright © 2001-2010 mmm-Team. All Rights Reserved.