public class Connection extends Object
| Constructor and Description |
|---|
Connection(Parser parser,
LowerLayerProtocol llp,
Socket bidirectional)
Creates a new instance of Connection, with inbound and outbound
communication on a single port.
|
Connection(Parser parser,
LowerLayerProtocol llp,
Socket bidirectional,
ExecutorService executorService) |
Connection(Parser parser,
LowerLayerProtocol llp,
Socket inbound,
Socket outbound)
Creates a new instance of Connection, with inbound communication on one
port and outbound on another.
|
Connection(Parser parser,
LowerLayerProtocol llp,
Socket inbound,
Socket outbound,
ExecutorService executorService)
Creates a new instance of Connection, with inbound communication on one
port and outbound on another.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Start the receiver thread(s)
|
void |
close()
Stops running Receiver threads and closes open sockets
|
protected HL7Writer |
getAckWriter()
Returns the HL7Writer through which responses to inbound messages should
be sent.
|
ExecutorService |
getExecutorService() |
Initiator |
getInitiator()
Returns the Initiator associated with this connection
|
Parser |
getParser() |
InetAddress |
getRemoteAddress()
Returns the address of the remote host to which this Connection is
connected.
|
int |
getRemotePort()
Returns the remote port on the remote host to which this Connection is
connected.
|
ca.uhn.hl7v2.app.Responder |
getResponder()
Returns the Responder associated with this connection
|
protected HL7Writer |
getSendWriter()
Returns the HL7Writer through which unsolicited outbound messages should
be sent.
|
boolean |
isOpen() |
protected boolean |
isRecipientWaiting(String ackID,
String message)
Given the ack ID (MSA-2) of a message, notifies a waiting consumer thread
about a received response.
|
boolean |
isSecure() |
String |
toString() |
protected Future<String> |
waitForResponse(String messageID,
long timeout)
Reserves a future incoming message by ack ID.
|
public Connection(Parser parser, LowerLayerProtocol llp, Socket bidirectional) throws LLPException, IOException
LLPExceptionIOExceptionpublic Connection(Parser parser, LowerLayerProtocol llp, Socket bidirectional, ExecutorService executorService) throws LLPException, IOException
LLPExceptionIOExceptionpublic Connection(Parser parser, LowerLayerProtocol llp, Socket inbound, Socket outbound) throws LLPException, IOException
LLPExceptionIOExceptionpublic Connection(Parser parser, LowerLayerProtocol llp, Socket inbound, Socket outbound, ExecutorService executorService) throws LLPException, IOException
LLPExceptionIOExceptionpublic void activate()
public ExecutorService getExecutorService()
public InetAddress getRemoteAddress()
public int getRemotePort()
public Initiator getInitiator()
public ca.uhn.hl7v2.app.Responder getResponder()
public boolean isSecure()
protected HL7Writer getSendWriter()
protected HL7Writer getAckWriter()
protected Future<String> waitForResponse(String messageID, long timeout) throws InterruptedException
InterruptedExceptionprotected boolean isRecipientWaiting(String ackID, String message)
public void close()
public boolean isOpen()
Copyright © 2001-2013 University Health Network. All Rights Reserved.