Package ca.uhn.hl7v2.app
Interface Initiator
- All Known Implementing Classes:
ActiveInitiator
public interface Initiator
Interface for an Initiator
-
Method Summary
Modifier and TypeMethodDescriptionsendAndReceive(Message outgoing) Sends a message to a server and waits for the responsevoidsetTimeout(long timeout, TimeUnit timeUnit) Sets the time that the initiator will wait for a response for a given message before timing out and throwing an exception (default is 10 seconds).voidsetTimeoutMillis(int timeout) Deprecated.
-
Method Details
-
sendAndReceive
Sends a message to a server and waits for the response- Parameters:
outgoing- outgoing message- Returns:
- resposne message
- Throws:
HL7ExceptionLLPExceptionIOException
-
setTimeout
Sets the time that the initiator will wait for a response for a given message before timing out and throwing an exception (default is 10 seconds).- Parameters:
timeout- time durationtimeUnit- time unit
-
setTimeoutMillis
Deprecated.Sets the time (in milliseconds) that the initiator will wait for a response for a given message before timing out and throwing an exception (default is 10 seconds).- Parameters:
timeout- time in milliseconds
-
setTimeout(long, java.util.concurrent.TimeUnit)}