|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.uhn.hl7v2.app.Connection
public class Connection
A TCP/IP connection to a remote HL7 server.
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Connection(Parser parser,
LowerLayerProtocol llp,
Socket bidirectional)
throws LLPException,
IOException
LLPException
IOException
public Connection(Parser parser,
LowerLayerProtocol llp,
Socket bidirectional,
ExecutorService executorService)
throws LLPException,
IOException
LLPException
IOException
public Connection(Parser parser,
LowerLayerProtocol llp,
Socket inbound,
Socket outbound)
throws LLPException,
IOException
LLPException
IOException
public Connection(Parser parser,
LowerLayerProtocol llp,
Socket inbound,
Socket outbound,
ExecutorService executorService)
throws LLPException,
IOException
LLPException
IOException| Method Detail |
|---|
public void activate()
public ExecutorService getExecutorService()
public InetAddress getRemoteAddress()
public int getRemotePort()
public Initiator getInitiator()
public Responder getResponder()
public boolean isSecure()
protected HL7Writer getSendWriter()
protected HL7Writer getAckWriter()
public Parser getParser()
public String toString()
toString in class Object
protected Future<String> waitForResponse(String messageID,
long timeout)
throws InterruptedException
InterruptedException
protected boolean isRecipientWaiting(String ackID,
String message)
public void close()
public boolean isOpen()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||