|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.healthmarketscience.rmiio.exporter.RemoteOutputStreamClientProxy
public abstract class RemoteOutputStreamClientProxy
Base RemoteOutputStream implementation which translates each method
invocation into a call to the invoke(int, java.lang.Object...)
method in a manner compatible
with the RemoteStreamServerInvokerHelper
invoke
method for
a RemoteOutputStreamServer. This class may be useful for exporting remote
stream servers in alternative RPC frameworks.
Constructor Summary | |
---|---|
RemoteOutputStreamClientProxy()
|
Method Summary | |
---|---|
void |
close(boolean readSuccess)
Closes the output stream and releases the resources for this server object. |
void |
flush()
Flushes the output stream and forces as much as possible of any buffered bytes to be written out. |
protected abstract Object |
invoke(int methodCode,
Object... parameters)
Invokes the given method name with the given parameters on the remote RemoteInputStreamServer and returns the results. |
boolean |
usingGZIPCompression()
Returns true if the stream is using GZIP compression over
the wire. |
void |
writePacket(byte[] packet,
int packetId)
Writes the next chunk of data to this stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RemoteOutputStreamClientProxy()
Method Detail |
---|
public boolean usingGZIPCompression() throws IOException
RemoteOutputStream
true
if the stream is using GZIP compression over
the wire.
usingGZIPCompression
in interface RemoteOutputStream
true
iff the stream data is compressed,
false
otherwise
IOException
public void close(boolean readSuccess) throws IOException
RemoteOutputStream
close
in interface RemoteOutputStream
readSuccess
- true
iff all data was sent successfully
from the client, false
otherwise
IOException
public void flush() throws IOException
RemoteOutputStream
flush
in interface RemoteOutputStream
flush
in interface Flushable
IOException
public void writePacket(byte[] packet, int packetId) throws IOException
RemoteOutputStream
writePacket
in interface RemoteOutputStream
packet
- iff the packetId was the same one from the last read call,
this chunk of data is ignored. Otherwise, writes this new
chunk of data to the stream.packetId
- client specified id for this packet
IOException
protected abstract Object invoke(int methodCode, Object... parameters) throws IOException
methodCode
- the name of the method to invoke, one of the
RemoteStreamServerInvokerHelper.IN_*_METHOD
constantsparameters
- parameters for the method invocation (may be
null
if the method takes no parameters)
null
for void methods)
IOException
- if the remote server throws or there is a
communication failure.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |