Class MapRpcServer


  • public class MapRpcServer
    extends RpcServer
    Subclass of RpcServer which uses AMQP wire-format encoded tables as requests and replies.
    • Constructor Detail

      • MapRpcServer

        public MapRpcServer​(Channel channel)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • MapRpcServer

        public MapRpcServer​(Channel channel,
                            java.lang.String queueName)
                     throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • 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 to handleMapCall(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 class RpcServer
      • handleMapCast

        public void handleMapCast​(java.util.Map<java.lang.String,​java.lang.Object> requestBody)
        Default implementation override in subclasses. Does nothing.