java.lang.Object | |
↳ | com.rabbitmq.client.RpcServer |
Known Direct Subclasses |
Known Indirect Subclasses |
Class which manages a request queue for a simple RPC-style service. The class is agnostic about the format of RPC arguments / return values.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates an RpcServer listening on a temporary exclusive
autodelete queue.
| |||||||||||
If the passed-in queue name is null, creates a server-named
temporary exclusive autodelete queue to use; otherwise expects
the queue to have already been declared.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public API - cancels the consumer, thus deleting the queue, if
it was a temporary queue, and marks the RpcServer as closed.
| |||||||||||
Retrieve the channel.
| |||||||||||
Retrieve the queue name.
| |||||||||||
Lowest-level response method.
| |||||||||||
Mid-level response method.
| |||||||||||
High-level response method.
| |||||||||||
Mid-level handler method.
| |||||||||||
High-level handler method.
| |||||||||||
Lowest-level handler method.
| |||||||||||
Public API - main server loop.
| |||||||||||
Private API - Process a single request.
| |||||||||||
Call this method to terminate the mainloop.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Registers a consumer on the reply queue.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Creates an RpcServer listening on a temporary exclusive autodelete queue.
IOException |
---|
If the passed-in queue name is null, creates a server-named temporary exclusive autodelete queue to use; otherwise expects the queue to have already been declared.
IOException |
---|
Public API - cancels the consumer, thus deleting the queue, if it was a temporary queue, and marks the RpcServer as closed.
IOException | if an error is encountered |
---|
Retrieve the channel.
Retrieve the queue name.
Lowest-level response method. Calls handleCall(AMQP.BasicProperties,byte[],AMQP.BasicProperties).
Mid-level response method. Calls handleCall(byte[],AMQP.BasicProperties).
High-level response method. Returns an empty response by default - override this (or other handleCall and handleCast methods) in subclasses.
Mid-level handler method. Calls handleCast(byte[]).
High-level handler method. Does nothing by default - override this (or other handleCast and handleCast methods) in subclasses.
Lowest-level handler method. Calls handleCast(AMQP.BasicProperties,byte[]).
Public API - main server loop. Call this to begin processing requests. Request processing will continue until the Channel (or its underlying Connection) is shut down, or until terminateMainloop() is called. Note that if the mainloop is blocked waiting for a request, the termination flag is not checked until a request is received, so a good time to call terminateMainloop() is during a request handler.
IOException |
---|
Private API - Process a single request. Called from mainloop().
IOException |
---|
Call this method to terminate the mainloop. Note that if the mainloop is blocked waiting for a request, the termination flag is not checked until a request is received, so a good time to call terminateMainloop() is during a request handler.
Registers a consumer on the reply queue.
IOException | if an error is encountered |
---|