Package com.rabbitmq.client
Class MapRpcServer
- java.lang.Object
-
- com.rabbitmq.client.RpcServer
-
- com.rabbitmq.client.MapRpcServer
-
public class MapRpcServer extends RpcServer
Subclass of RpcServer which uses AMQP wire-format encoded tables as requests and replies.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.rabbitmq.client.RpcServer
RpcServer.RpcConsumer
-
-
Constructor Summary
Constructors Constructor Description MapRpcServer(Channel channel)
MapRpcServer(Channel channel, java.lang.String queueName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,java.lang.Object>
decode(byte[] requestBody)
static byte[]
encode(java.util.Map<java.lang.String,java.lang.Object> reply)
byte[]
handleCall(byte[] requestBody, AMQP.BasicProperties replyProperties)
Overridden to delegate to handleMapCall.void
handleCast(byte[] requestBody)
Overridden to delegate to handleMapCast.java.util.Map<java.lang.String,java.lang.Object>
handleMapCall(java.util.Map<java.lang.String,java.lang.Object> request)
Default implementation override in subclasses.java.util.Map<java.lang.String,java.lang.Object>
handleMapCall(java.util.Map<java.lang.String,java.lang.Object> request, AMQP.BasicProperties replyProperties)
Delegates tohandleMapCall(Map)
.void
handleMapCast(java.util.Map<java.lang.String,java.lang.Object> requestBody)
Default implementation override in subclasses.-
Methods inherited from class com.rabbitmq.client.RpcServer
close, getChannel, getQueueName, handleCall, handleCall, handleCast, handleCast, mainloop, postprocessReplyProperties, preprocessReplyProperties, processRequest, setupConsumer, terminateMainloop
-
-
-
-
Method Detail
-
handleCall
public byte[] handleCall(byte[] requestBody, AMQP.BasicProperties replyProperties)
Overridden to delegate to handleMapCall.- Overrides:
handleCall
in classRpcServer
-
decode
public static java.util.Map<java.lang.String,java.lang.Object> decode(byte[] requestBody) throws java.io.IOException
- Throws:
java.io.IOException
-
encode
public static byte[] encode(java.util.Map<java.lang.String,java.lang.Object> reply) throws java.io.IOException
- Throws:
java.io.IOException
-
handleMapCall
public java.util.Map<java.lang.String,java.lang.Object> handleMapCall(java.util.Map<java.lang.String,java.lang.Object> request, AMQP.BasicProperties replyProperties)
Delegates tohandleMapCall(Map)
.
-
handleMapCall
public java.util.Map<java.lang.String,java.lang.Object> handleMapCall(java.util.Map<java.lang.String,java.lang.Object> request)
Default implementation override in subclasses. Returns the empty string.
-
handleCast
public void handleCast(byte[] requestBody)
Overridden to delegate to handleMapCast.- Overrides:
handleCast
in classRpcServer
-
handleMapCast
public void handleMapCast(java.util.Map<java.lang.String,java.lang.Object> requestBody)
Default implementation override in subclasses. Does nothing.
-
-