|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.uhn.hl7v2.app.Initiator
public class Initiator
Performs the initiation role of a message exchange (i.e sender of the first message; analagous to the client in a client-server interaction), according to HL7's original mode processing rules.
The sendAndReceive(...)
method blocks until either a response is received
with the matching message ID, or until a timeout period has passed. The timeout defaults to
10000 ms (10 sec) but can be configured by setting the system property "ca.uhn.hl7v2.app.initiator.timeout"
to an integer value representing the number of ms after which to time out.
At the time of writing, enhanced mode, two-phase reply, continuation messages, and batch processing are unsupported.
Constructor Summary | |
---|---|
protected |
Initiator(Connection conn)
Creates a new instance of Initiator. |
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
Test harness |
Message |
sendAndReceive(Message out)
Sends a message to a responder system, receives the reply, and returns the reply as a Message object. |
void |
setTimeoutMillis(int timeout)
Sets the time (in milliseconds) that the initiator will wait for a response for a given message before timing out and throwing an exception (default is 10 seconds). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Initiator(Connection conn) throws LLPException
conn
- the Connection associated with this Initiator.
LLPException
Method Detail |
---|
public Message sendAndReceive(Message out) throws HL7Exception, LLPException, java.io.IOException
HL7Exception
LLPException
java.io.IOException
public void setTimeoutMillis(int timeout)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |