public class InitiatorImpl extends Object implements Initiator
Initiator.| Constructor and Description |
|---|
InitiatorImpl(Parser theParser,
Processor theProcessor)
Creates an instance that uses the given
Parser |
InitiatorImpl(Processor theProcessor)
Creates an instance that uses a
GenericParser |
| Modifier and Type | Method and Description |
|---|---|
int |
getMaxRetries() |
List<String> |
getMetadataFields() |
Parser |
getParser() |
long |
getReceiveTimeout() |
long |
getRetryInterval() |
Processor |
getUnderlyingProcessor() |
Message |
sendAndReceive(Message theMessage)
Encodes a message, sends it to a remote system, awaits the response,
parses it, and returns it.
|
void |
setMaxRetries(int theMaxRetries) |
void |
setReceiveTimeout(long theReceiveTimeout) |
void |
setRetryInterval(long theRetryIntervalMillis) |
public InitiatorImpl(Processor theProcessor)
GenericParsertheProcessor - the Processor used to communicate
with the remote systempublic InitiatorImpl(Parser theParser, Processor theProcessor)
ParsertheParser - parser to use for parsing and encoding messagestheProcessor - the Processor used to communicate
with the remote systempublic void setMaxRetries(int theMaxRetries)
theMaxRetries - max number of retries for initial message deliverypublic int getMaxRetries()
public void setRetryInterval(long theRetryIntervalMillis)
theRetryIntervalMillis - milliseconds between retries of message deliverypublic long getRetryInterval()
public void setReceiveTimeout(long theReceiveTimeout)
theReceiveTimeout - the length of time we wait for responses (defaults
to 10 seconds)public long getReceiveTimeout()
public Message sendAndReceive(Message theMessage) throws HL7Exception
InitiatorsendAndReceive in interface InitiatortheMessage - the message to send to the remote systemHL7ExceptionInitiator.sendAndReceive(ca.uhn.hl7v2.model.Message)public Parser getParser()
getParser in interface InitiatorParser 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.Initiator.getParser()public Processor getUnderlyingProcessor()
getUnderlyingProcessor in interface InitiatorProcessor instance that is used to perform the message
exchangeInitiator.getUnderlyingProcessor()public List<String> getMetadataFields()
getMetadataFields in interface InitiatorMessage
is converted to a Transportable. Each field is a Terser
path (type String).Initiator.getMetadataFields()Copyright © 2001–2017 University Health Network. All rights reserved.