public interface Requestor
BytesXMLMessage request(XMLMessage request, long timeoutMillis, Destination sendDestination) throws JCSMPException
timeoutMillisparameter controls whether this call should operate in a blocking fashion.
>0, the call blocks for up to the number of
milliseconds specified by
timeoutMillis while the
Requestor waits for a reply. If none is received during this
JCSMPRequestTimeoutException is thrown.
0, the call returns
null after the request
message has been sent. The application should then examine incoming
messages on a
XMLMessageConsumer or its
XMLMessageListener for a reply, which will be sent to the
Destination specified in the request's ReplyTo header field. To correlate
replies to sent requests, an application can use the
CorrelationId field on
request- The request message to send.
timeoutMillis- The amount of time to allow for a reply to come in.
sendDestination- The Destination the request should be addressed to. Currently,
Topics are supported.
IllegalArgumentException- If the Topic is invalid in the current session mode.
JCSMPRequestTimeoutException- If a blocking request times out.
JCSMPException- If there is an error sending the request, or any other JCSMP error.
Copyright 2004-2021 Solace Corporation. All rights reserved.