Package ca.uhn.hl7v2.protocol.impl
Class SocketStreamSource
java.lang.Object
ca.uhn.hl7v2.protocol.impl.SocketStreamSource
- All Implemented Interfaces:
StreamSource
- Direct Known Subclasses:
ClientSocketStreamSource,ServerSocketStreamSource
A base implementation of
StreamSource based on sockets.- Version:
- $Revision: 1.1 $ updated on $Date: 2007-02-19 02:24:26 $ by $Author: jamesagnew $
- Author:
- Bryan Tripp
-
Constructor Details
-
SocketStreamSource
public SocketStreamSource()
-
-
Method Details
-
getSocket
- Returns:
- a socket from which input and output streams for message exchages are to be obtained
-
connect
Gets fresh instance of socket, which is subsequently available fromgetSocket().- Specified by:
connectin interfaceStreamSource- Throws:
TransportException
-
disconnect
Closes streams and underlying socket.- Specified by:
disconnectin interfaceStreamSource- Throws:
TransportException- See Also:
-
getOutboundStream
- Specified by:
getOutboundStreamin interfaceStreamSource- Returns:
- the stream to which we write outbound messages.
- Throws:
TransportException
-
getInboundStream
- Specified by:
getInboundStreamin interfaceStreamSource- Returns:
- the stream to which we expect the remote server to send messages.
- Throws:
TransportException
-