Interface Initiator

All Known Implementing Classes:
InitiatorImpl

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.

Version:
$Revision: 1.1 $ updated on $Date: 2007-02-19 02:24:38 $ by $Author: jamesagnew $
Author:
Bryan Tripp
  • Method Details

    • sendAndReceive

      Encodes a message, sends it to a remote system, awaits the response, parses it, and returns it. The response may be null if the message doesn't require an application-level acknowledgement.
      Parameters:
      theMessage - the message to send to the remote system
      Returns:
      the response from the remote system
      Throws:
      HL7Exception
    • getParser

      Returns:
      the 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.
    • getUnderlyingProcessor

      Returns:
      the Processor instance that is used to perform the message exchange
    • getMetadataFields

      Returns:
      the list of fields that will be included as metadata when a Message is converted to a Transportable. Each field is a Terser path (type String).