|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.healthmarketscience.rmiio.RemoteWrapper<RemoteInputStream>
com.healthmarketscience.rmiio.RemoteInputStreamWrapper
public class RemoteInputStreamWrapper
Wrapper for a RemoteInputStream stub which handles retry magic under the hood. The retry policy for a given method call will use the internal policy for the default methods, but may be overridden on a per-call basis using the extended methods.
| Field Summary |
|---|
| Fields inherited from class com.healthmarketscience.rmiio.RemoteWrapper |
|---|
_log, _retry, _stub |
| Fields inherited from interface com.healthmarketscience.rmiio.RemoteClient |
|---|
DEFAULT_RETRY |
| Constructor Summary | |
|---|---|
RemoteInputStreamWrapper(RemoteInputStream stub,
RemoteRetry retry,
org.apache.commons.logging.Log log)
|
|
| Method Summary | |
|---|---|
int |
available()
Returns the number of bytes that can be read from this stream without blocking. |
int |
available(RemoteRetry retry)
|
void |
close(boolean readSuccess)
Closes the input stream and releases the resources for this server object. |
void |
close(boolean readSuccess,
RemoteRetry retry)
|
byte[] |
readPacket(int packetId)
Reads the next chunk of data for this stream. |
byte[] |
readPacket(int packetId,
RemoteRetry retry)
|
long |
skip(long n,
int skipId)
Skips and discards up to the given number of bytes in the stream, and returns the actual number of bytes skipped. |
long |
skip(long n,
int skipId,
RemoteRetry retry)
|
boolean |
usingGZIPCompression()
Returns true if the stream is using GZIP compression over
the wire. |
boolean |
usingGZIPCompression(RemoteRetry retry)
|
| Methods inherited from class com.healthmarketscience.rmiio.RemoteWrapper |
|---|
getLog, getRemoteRetry, getStub, getWrapper, invoke, setRemoteRetry, wrap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RemoteInputStreamWrapper(RemoteInputStream stub,
RemoteRetry retry,
org.apache.commons.logging.Log log)
| Method Detail |
|---|
public boolean usingGZIPCompression()
throws IOException
RemoteInputStreamtrue if the stream is using GZIP compression over
the wire.
usingGZIPCompression in interface RemoteInputStreamtrue iff the stream data is compressed,
false otherwise
IOException
public boolean usingGZIPCompression(RemoteRetry retry)
throws IOException
IOException
public int available()
throws IOException
RemoteInputStream
available in interface RemoteInputStreamIOException
public int available(RemoteRetry retry)
throws IOException
IOException
public void close(boolean readSuccess)
throws IOException
RemoteInputStream
close in interface RemoteInputStreamreadSuccess - true iff all data was read successfully
by the client, false otherwise
IOException
public void close(boolean readSuccess,
RemoteRetry retry)
throws IOException
IOException
public byte[] readPacket(int packetId)
throws IOException
RemoteInputStream
readPacket in interface RemoteInputStreampacketId - client specified id for this packet
IOException
public byte[] readPacket(int packetId,
RemoteRetry retry)
throws IOException
IOException
public long skip(long n,
int skipId)
throws IOException
RemoteInputStream
skip in interface RemoteInputStreamn - the number of bytes to skipskipId - client specified id for this skip attempt
IOException
public long skip(long n,
int skipId,
RemoteRetry retry)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||