|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.uhn.hl7v2.protocol.impl.InitiatorImpl
public class InitiatorImpl
Default implementation of Initiator
.
Constructor Summary | |
---|---|
InitiatorImpl(Parser theParser,
Processor theProcessor)
Creates an instance that uses the given Parser |
|
InitiatorImpl(Processor theProcessor)
Creates an instance that uses a GenericParser |
Method Summary | |
---|---|
int |
getMaxRetries()
|
java.util.List |
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 systemMethod Detail |
---|
public 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 system
HL7Exception
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 java.util.List getMetadataFields()
getMetadataFields
in interface Initiator
Message
is converted to a Transportable
. Each field is a Terser
path (type String).Initiator.getMetadataFields()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |