| Constructor and Description |
|---|
RequestorImpl(JCSMPBasicSession session) |
| Modifier and Type | Method and Description |
|---|---|
BytesXMLMessage |
request(XMLMessage request,
long timeoutMillis,
Destination sendDestination)
Performs a request to the specified destination.
|
public RequestorImpl(JCSMPBasicSession session)
public BytesXMLMessage request(XMLMessage request, long timeoutMillis, Destination sendDestination) throws JCSMPException
Requestor
If request has no ReplyTo destination or ReplyToSuffix set, the session's default ReplyTo destination is set on
the message.
timeoutMillis parameter controls whether this call
should operate in a blocking fashion.
If >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
time, a JCSMPRequestTimeoutException is thrown.
If 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
outgoing requests.
DeliveryMode.PERSISTENT or DeliveryMode.NON_PERSISTENT).request in interface Requestorrequest - 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.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.