Class ProtobufDecoder

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private com.google.protobuf.ExtensionRegistry extensionRegistry  
      private static boolean HAS_PARSER  
      private com.google.protobuf.MessageLite prototype  
    • Constructor Summary

      Constructors 
      Constructor Description
      ProtobufDecoder​(com.google.protobuf.MessageLite prototype)
      Creates a new instance.
      ProtobufDecoder​(com.google.protobuf.MessageLite prototype, com.google.protobuf.ExtensionRegistry extensionRegistry)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.Object decode​(ChannelHandlerContext ctx, Channel channel, java.lang.Object msg)
      Transforms the specified received message into another message and return the transformed message.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • HAS_PARSER

        private static final boolean HAS_PARSER
      • prototype

        private final com.google.protobuf.MessageLite prototype
      • extensionRegistry

        private final com.google.protobuf.ExtensionRegistry extensionRegistry
    • Constructor Detail

      • ProtobufDecoder

        public ProtobufDecoder​(com.google.protobuf.MessageLite prototype)
        Creates a new instance.
      • ProtobufDecoder

        public ProtobufDecoder​(com.google.protobuf.MessageLite prototype,
                               com.google.protobuf.ExtensionRegistry extensionRegistry)
    • Method Detail

      • decode

        protected java.lang.Object decode​(ChannelHandlerContext ctx,
                                          Channel channel,
                                          java.lang.Object msg)
                                   throws java.lang.Exception
        Description copied from class: OneToOneDecoder
        Transforms the specified received message into another message and return the transformed message. Return null if the received message is supposed to be discarded.
        Specified by:
        decode in class OneToOneDecoder
        Throws:
        java.lang.Exception