com.healthmarketscience.rmiio
Class RemoteInputStreamMonitor

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

public class RemoteInputStreamMonitor
extends Object
implements RemoteStreamMonitor<RemoteInputStreamServer>

Implementation of RemoteStreamMonitor for RemoteInputStreamServers which does nothing.

Author:
James Ahlborn

Constructor Summary
RemoteInputStreamMonitor()
           
 
Method Summary
 void bytesMoved(RemoteInputStreamServer stream, int numBytes, boolean isReattempt)
          Called when some bytes are transferred over the wire by the given stream.
 void bytesSkipped(RemoteInputStreamServer stream, long numBytes, boolean isReattempt)
          Called when some bytes are skipped for transfer over the wire by the given stream.
 void closed(RemoteInputStreamServer stream, boolean clean)
          Called when the given stream is closed.
 void failure(RemoteInputStreamServer stream, Exception e)
          Called when an IOException is thrown by one of the stream methods.
 void localBytesMoved(RemoteInputStreamServer stream, int numBytes)
          Called when some bytes are moved to/from the local stream.
 void localBytesSkipped(RemoteInputStreamServer 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

RemoteInputStreamMonitor

public RemoteInputStreamMonitor()
Method Detail

failure

public void failure(RemoteInputStreamServer 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<RemoteInputStreamServer>
Parameters:
stream - the stream on which the exception was thrown
e - the thrown exception

bytesMoved

public void bytesMoved(RemoteInputStreamServer 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<RemoteInputStreamServer>
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(RemoteInputStreamServer 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<RemoteInputStreamServer>
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(RemoteInputStreamServer 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<RemoteInputStreamServer>
Parameters:
stream - the remote stream for which the bytes are being moved
numBytes - number of bytes moved

localBytesSkipped

public void localBytesSkipped(RemoteInputStreamServer 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<RemoteInputStreamServer>
Parameters:
stream - the stream for which the bytes are being skipped
numBytes - number of actual bytes skipped

closed

public void closed(RemoteInputStreamServer 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<RemoteInputStreamServer>
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.