wt.method
Class OutputStreamProxy
java.lang.Object
wt.method.OutputStreamProxy
- All Implemented Interfaces:
- Externalizable, Serializable
- public class OutputStreamProxy
- extends Object
- implements Externalizable
A Windchill RMI method server argument class to proxy an output stream
from server-side code to a client-side output stream. It works whether
the client and server code are separate or colocated in the same process.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BUFSIZ
private static final int BUFSIZ
- See Also:
- Constant Field Values
threadLocalProxy
private static ThreadLocal threadLocalProxy
clientOut
private transient OutputStream clientOut
sender
private transient OutputStreamProxy.Sender sender
clientOutputPerformed
private transient boolean clientOutputPerformed
OutputStreamProxy
public OutputStreamProxy(OutputStream client_output_stream)
- Create an output stream proxy for a given client output stream.
Only one such argument is allowed per call.
OutputStreamProxy
public OutputStreamProxy()
getOutputStream
public OutputStream getOutputStream()
throws IOException
- Get output stream in server that will write to client's output stream.
Caller MUST call closeOutputStream in a finally block when done writing.
The returned output stream is already buffered for efficient transfer.
- Throws:
IOException
closeOutputStream
public void closeOutputStream()
throws IOException
- Signal the end of proxied output.
This is required by the communication protocol, but it does not close the
client's output stream.
- Throws:
IOException
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
- Specified by:
writeExternal
in interface Externalizable
- Throws:
IOException
readExternal
public void readExternal(ObjectInput in)
throws IOException
- Specified by:
readExternal
in interface Externalizable
- Throws:
IOException
setClientOutputPerformed
void setClientOutputPerformed(boolean performed)
setThreadLocalProxy
static void setThreadLocalProxy(OutputStreamProxy proxy)
getThreadLocalProxy
static OutputStreamProxy getThreadLocalProxy()