com.healthmarketscience.rmiio
Class RemoteOutputStreamMonitor

java.lang.Object
  extended by com.healthmarketscience.rmiio.RemoteOutputStreamMonitor
All Implemented Interfaces:
RemoteStreamMonitor<RemoteOutputStreamServer>

public class RemoteOutputStreamMonitor
extends Object
implements RemoteStreamMonitor<RemoteOutputStreamServer>

Implementation of RemoteStreamMonitor for RemoteOutputStreamServers which does nothing.

Author:
James Ahlborn

Constructor Summary
RemoteOutputStreamMonitor()
           
 
Method Summary
 void bytesMoved(RemoteOutputStreamServer stream, int numBytes, boolean isReattempt)
          Called when some bytes are transferred over the wire by the given stream.
 void bytesSkipped(RemoteOutputStreamServer stream, long numBytes, boolean isReattempt)
          Called when some bytes are skipped for transfer over the wire by the given stream.
 void closed(RemoteOutputStreamServer stream, boolean clean)
          Called when the given stream is closed.
 void failure(RemoteOutputStreamServer stream, Exception e)
          Called when an IOException is thrown by one of the stream methods.
 void localBytesMoved(RemoteOutputStreamServer stream, int numBytes)
          Called when some bytes are moved to/from the local stream.
 void localBytesSkipped(RemoteOutputStreamServer stream, long numBytes)
          Called when some bytes from the local stream are skipped.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteOutputStreamMonitor

public RemoteOutputStreamMonitor()
Method Detail

failure

public void failure(RemoteOutputStreamServer stream,
                    Exception e)
Description copied from interface: RemoteStreamMonitor
Called when an IOException is thrown by one of the stream methods.

Specified by:
failure in interface RemoteStreamMonitor<RemoteOutputStreamServer>
Parameters:
stream - the stream on which the exception was thrown
e - the thrown exception

bytesMoved

public void bytesMoved(RemoteOutputStreamServer stream,
                       int numBytes,
                       boolean isReattempt)
Description copied from interface: RemoteStreamMonitor
Called when some bytes are transferred over the wire by the given stream. Note, as some streams use compression over the wire, the total number of bytes moved/skipped may not equal the total number of local bytes moved/skipped.

Specified by:
bytesMoved in interface RemoteStreamMonitor<RemoteOutputStreamServer>
Parameters:
stream - the stream for which the bytes are being transferred
numBytes - number of bytes transferred
isReattempt - indicates if this is the first attempt (false) or a subsequent attempt (true)

bytesSkipped

public void bytesSkipped(RemoteOutputStreamServer stream,
                         long numBytes,
                         boolean isReattempt)
Description copied from interface: RemoteStreamMonitor
Called when some bytes are skipped for transfer over the wire by the given stream. Will not be called for output streams. Note, as some streams use compression over the wire, the total number of bytes moved/skipped may not equal the total number of local bytes moved/skipped.

Specified by:
bytesSkipped in interface RemoteStreamMonitor<RemoteOutputStreamServer>
Parameters:
stream - the stream for which the bytes are being skipped
numBytes - number of actual bytes skipped
isReattempt - indicates if this is the first attempt (false) or a subsequent attempt (true)

localBytesMoved

public void localBytesMoved(RemoteOutputStreamServer stream,
                            int numBytes)
Description copied from interface: RemoteStreamMonitor
Called when some bytes are moved to/from the local stream. Note, as some streams use compression over the wire, the total number of bytes moved/skipped may not equal the total number of local bytes moved/skipped.

Specified by:
localBytesMoved in interface RemoteStreamMonitor<RemoteOutputStreamServer>
Parameters:
stream - the remote stream for which the bytes are being moved
numBytes - number of bytes moved

localBytesSkipped

public void localBytesSkipped(RemoteOutputStreamServer stream,
                              long numBytes)
Description copied from interface: RemoteStreamMonitor
Called when some bytes from the local stream are skipped. Will not be called for output streams. Note, as some streams use compression over the wire, the total number of bytes moved/skipped may not equal the total number of local bytes moved/skipped.

Specified by:
localBytesSkipped in interface RemoteStreamMonitor<RemoteOutputStreamServer>
Parameters:
stream - the stream for which the bytes are being skipped
numBytes - number of actual bytes skipped

closed

public void closed(RemoteOutputStreamServer stream,
                   boolean clean)
Description copied from interface: RemoteStreamMonitor
Called when the given stream is closed. The clean parameter indicates whether or not the transfer completed successfully.

Specified by:
closed in interface RemoteStreamMonitor<RemoteOutputStreamServer>
Parameters:
stream - the stream for which the bytes are being skipped
clean - true iff all data was sent successfully over the wire and the stream was closed, false otherwise.


Copyright © 2006-2009 Health Market Science. All Rights Reserved.