public interface Initiator
A convenient way for the initiator of a message exchange to send a message to a remote server and await the response in the same thread.
Acknowledgements, threading, and accept-level retries are handled by
an associated Processor
.
Recall that acknowledgement requirements are specified in MSH fields 15 and 16 (see HL7 v2.5 chapter 2), so the sender has control. If no response is needed, and you would like this call to return right away, specify that no acknowledgements are required.
Modifier and Type | Method and Description |
---|---|
List<String> |
getMetadataFields() |
Parser |
getParser() |
Processor |
getUnderlyingProcessor() |
Message |
sendAndReceive(Message theMessage)
Encodes a message, sends it to a remote system, awaits the response,
parses it, and returns it.
|
Message sendAndReceive(Message theMessage) throws HL7Exception
theMessage
- the message to send to the remote systemHL7Exception
Parser getParser()
Parser
that is used to encode outbound messages
and parse inbound ones. It may be of interest to set certain parameters
of this parser, for example whether to use XML encoding.Processor getUnderlyingProcessor()
Processor
instance that is used to perform the message
exchangeList<String> getMetadataFields()
Message
is converted to a Transportable
. Each field is a Terser
path (type String).Copyright © 2001–2017 University Health Network. All rights reserved.