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)
GenericParser
theProcessor
- the Processor
used to communicate
with the remote systempublic InitiatorImpl(Parser theParser, Processor theProcessor)
Parser
theParser
- 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
Initiator
sendAndReceive
in interface Initiator
theMessage
- the message to send to the remote systemHL7Exception
Initiator.sendAndReceive(ca.uhn.hl7v2.model.Message)
public Parser getParser()
getParser
in interface Initiator
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.Initiator.getParser()
public Processor getUnderlyingProcessor()
getUnderlyingProcessor
in interface Initiator
Processor
instance that is used to perform the message
exchangeInitiator.getUnderlyingProcessor()
public List<String> getMetadataFields()
getMetadataFields
in interface Initiator
Message
is converted to a Transportable
. Each field is a Terser
path (type String).Initiator.getMetadataFields()
Copyright © 2001–2017 University Health Network. All rights reserved.