public class InterceptorConnection extends AbstractJRemoteConnection
This class is responsible for handling the message sending to and from an underlying JConnection. It is designed to intercept and handle returned messages that are not of the desired type. e.g. A subroutine call may have IO communication before the return parameters are received.
Constructor and Description |
---|
InterceptorConnection(AbstractJRemoteConnection c,
java.io.InputStream is,
java.io.OutputStream os) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close underlying connection.
|
Response |
receive()
Intercept any IO messages and handle required
input or output on in / out streams.
|
void |
send(JRemoteRequest request) |
void |
setInputStream(java.io.InputStream in)
Set the InputStream.
|
void |
setOutputStream(java.io.OutputStream out)
Set the OutputStream.
|
void |
setTerminalOutputWriter(java.io.Writer writer)
Set the OutputStream.
|
authenticate, authenticate, getCharset, getCharsetDecoder, getCharsetEncoder, sendWaitForResponse, setCharset, setProperties
public InterceptorConnection(AbstractJRemoteConnection c, java.io.InputStream is, java.io.OutputStream os)
public void setOutputStream(java.io.OutputStream out)
Set the OutputStream.
out
- Write output received from the connection to this OutputStreampublic void setTerminalOutputWriter(java.io.Writer writer)
Set the OutputStream.
writer
- Write output received from the connection to this Writerpublic void setInputStream(java.io.InputStream in)
Set the InputStream.
in
- Receive input from the supplied InputStreampublic void close() throws JRemoteException
Close underlying connection.
close
in class AbstractJRemoteConnection
JRemoteException
public void send(JRemoteRequest request) throws JRemoteException
send
in class AbstractJRemoteConnection
JRemoteException
public Response receive() throws JRemoteException
Intercept any IO messages and handle required input or output on in / out streams.
receive
in class AbstractJRemoteConnection
JRemoteException