ca.uhn.hl7v2.protocol
Interface StreamSource

All Known Implementing Classes:
ClientSocketStreamSource, ServerSocketStreamSource, SocketStreamSource

public interface StreamSource

A source of input and output streams for use with stream-based TransportLayers. Implementations should contain the necessary information for reconnecting streams as necessary. For example a ServerSocket-based implementation should be able to listen for fresh connections and get new streams from them (this must be done when refresh() is called).

Version:
$Revision: 1.1 $ updated on $Date: 2007/02/19 02:24:38 $ by $Author: jamesagnew $
Author:
Bryan Tripp

Method Summary
 void connect()
          Gets new streams.
 void disconnect()
          Closes streams and underlying connections.
 java.io.InputStream getInboundStream()
           
 java.io.OutputStream getOutboundStream()
           
 

Method Detail

connect

void connect()
             throws TransportException
Gets new streams. This should be called only if one of the streams is dead.

Throws:
TransportException

disconnect

void disconnect()
                throws TransportException
Closes streams and underlying connections.

Throws:
TransportException

getOutboundStream

java.io.OutputStream getOutboundStream()
                                       throws TransportException
Returns:
the stream to which we write outbound messages.
Throws:
TransportException

getInboundStream

java.io.InputStream getInboundStream()
                                     throws TransportException
Returns:
the stream to which we expect the remote server to send messages.
Throws:
TransportException


Copyright © 2001-2011 University Health Network. All Rights Reserved.