java.lang.Object | |
↳ | com.rabbitmq.client.RpcClient |
Known Direct Subclasses |
Convenience class which manages a temporary reply queue for simple RPC-style communication. The class is agnostic about the format of RPC arguments / return values. It simply provides a mechanism for sending a message to an exchange with a given routing key, and waiting for a response on a reply queue.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | NO_TIMEOUT | NO_TIMEOUT value must match convention on uninterruptibleGet(int) |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Construct a new RpcClient that will communicate on the given channel, sending
requests to the given exchange with the given routing key.
| |||||||||||
Construct a new RpcClient that will communicate on the given channel, sending
requests to the given exchange with the given routing key.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Private API - ensures the RpcClient is correctly open.
| |||||||||||
Public API - cancels the consumer, thus deleting the temporary queue, and marks the RpcClient as closed.
| |||||||||||
Retrieve the channel.
| |||||||||||
Retrieve the consumer.
| |||||||||||
Retrieve the continuation map.
| |||||||||||
Retrieve the correlation id.
| |||||||||||
Retrieve the exchange.
| |||||||||||
Retrieve the reply queue.
| |||||||||||
Retrieve the routing key.
| |||||||||||
Perform an AMQP wire-protocol-table based RPC roundtrip
There are some restrictions on the values appearing in the table: they must be of type String , LongString , Integer, java.math.BigDecimal, Date,
or (recursively) a Map of the enclosing type. | |||||||||||
Perform an AMQP wire-protocol-table based RPC roundtrip, first
constructing the table from an array of alternating keys (in
even-numbered elements, starting at zero) and values (in
odd-numbered elements, starting at one)
Restrictions on value arguments apply as in mapCall(Map) . | |||||||||||
Perform a simple byte-array-based RPC roundtrip.
| |||||||||||
Perform a simple string-based RPC roundtrip.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Registers a consumer on the reply queue.
| |||||||||||
Creates a server-named exclusive autodelete queue to use for
receiving replies to RPC requests.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
NO_TIMEOUT value must match convention on uninterruptibleGet(int)
Construct a new RpcClient that will communicate on the given channel, sending requests to the given exchange with the given routing key.
Causes the creation of a temporary private autodelete queue.channel | the channel to use for communication |
---|---|
exchange | the exchange to connect to |
routingKey | the routing key |
timeout | milliseconds before timing out on wait for response |
IOException | if an error is encountered |
---|
Construct a new RpcClient that will communicate on the given channel, sending requests to the given exchange with the given routing key.
Causes the creation of a temporary private autodelete queue. Waits forever for responses (that is, no timeout).channel | the channel to use for communication |
---|---|
exchange | the exchange to connect to |
routingKey | the routing key |
IOException | if an error is encountered |
---|
Private API - ensures the RpcClient is correctly open.
IOException | if an error is encountered |
---|
Public API - cancels the consumer, thus deleting the temporary queue, and marks the RpcClient as closed.
IOException | if an error is encountered |
---|
Retrieve the channel.
Retrieve the consumer.
Retrieve the continuation map.
Retrieve the correlation id.
Retrieve the exchange.
Retrieve the reply queue.
Retrieve the routing key.
Perform an AMQP wire-protocol-table based RPC roundtrip
There are some restrictions on the values appearing in the table:
they must be of type String
, LongString
, Integer, java.math.BigDecimal, Date,
or (recursively) a Map
of the enclosing type.
message | the table to send |
---|
ShutdownSignalException | if the connection dies during our wait |
---|---|
IOException | if an error is encountered |
TimeoutException | if a timeout occurs before a response is received |
Perform an AMQP wire-protocol-table based RPC roundtrip, first
constructing the table from an array of alternating keys (in
even-numbered elements, starting at zero) and values (in
odd-numbered elements, starting at one)
Restrictions on value arguments apply as in mapCall(Map)
.
keyValuePairs | alternating {key, value, key, value, ...} data to send |
---|
ShutdownSignalException | if the connection dies during our wait |
---|---|
IOException | if an error is encountered |
TimeoutException | if a timeout occurs before a response is received |
Perform a simple byte-array-based RPC roundtrip.
message | the byte array request message to send |
---|
ShutdownSignalException | if the connection dies during our wait |
---|---|
IOException | if an error is encountered |
TimeoutException | if a response is not received within the configured timeout |
Perform a simple string-based RPC roundtrip.
message | the string request message to send |
---|
ShutdownSignalException | if the connection dies during our wait |
---|---|
IOException | if an error is encountered |
TimeoutException | if a timeout occurs before the response is received |
Registers a consumer on the reply queue.
IOException | if an error is encountered |
---|
Creates a server-named exclusive autodelete queue to use for receiving replies to RPC requests.
IOException | if an error is encountered |
---|