wt.method
Class WriterProxy

java.lang.Object
  extended bywt.method.WriterProxy
All Implemented Interfaces:
Serializable

public class WriterProxy
extends Object
implements Serializable

A Windchill RMI method server argument class to proxy a Writer from server-side code to a client-side Writer. It works whether the client and server code are separate or colocated in the same process.

See Also:
Serialized Form

Nested Class Summary
(package private) static class WriterProxy.Receiver
           
static class WriterProxy.Test
           
 
Field Summary
private  Writer clientWriter
           
private  OutputStreamProxy proxy
           
private  Writer serverWriter
           
 
Constructor Summary
WriterProxy(Writer client_writer)
          Create a writer proxy for a given client writer.
 
Method Summary
 void closeWriter()
          Signal the end of proxied output.
 Writer getWriter()
          Get writer in server that will write to client's writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clientWriter

private transient Writer clientWriter

serverWriter

private transient Writer serverWriter

proxy

private OutputStreamProxy proxy
Constructor Detail

WriterProxy

public WriterProxy(Writer client_writer)
Create a writer proxy for a given client writer. Only one such argument is allowed per call.

Method Detail

getWriter

public Writer getWriter()
                 throws IOException
Get writer in server that will write to client's writer. Caller MUST call closeWriter in a finally block when done writing. The returned output stream is already buffered for efficient transfer.

Throws:
IOException

closeWriter

public void closeWriter()
                 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