ca.uhn.hl7v2.protocol
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 Summary
 java.util.List 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.
 

Method Detail

sendAndReceive

Message sendAndReceive(Message theMessage)
                       throws HL7Exception
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

Parser 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

Processor getUnderlyingProcessor()
Returns:
the Processor instance that is used to perform the message exchange

getMetadataFields

java.util.List 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).


Copyright © 2001-2011 University Health Network. All Rights Reserved.