com.alipay.remoting.rpc.protocol
Class RpcProtocolDecoder

java.lang.Object
  extended by io.netty.channel.ChannelHandlerAdapter
      extended by io.netty.channel.ChannelInboundHandlerAdapter
          extended by com.alipay.remoting.codec.AbstractBatchDecoder
              extended by com.alipay.remoting.codec.ProtocolCodeBasedDecoder
                  extended by com.alipay.remoting.rpc.protocol.RpcProtocolDecoder
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

public class RpcProtocolDecoder
extends ProtocolCodeBasedDecoder


Nested Class Summary
 
Nested classes/interfaces inherited from class com.alipay.remoting.codec.AbstractBatchDecoder
AbstractBatchDecoder.Cumulator
 
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
 
Field Summary
static int MIN_PROTOCOL_CODE_WITH_VERSION
           
 
Fields inherited from class com.alipay.remoting.codec.ProtocolCodeBasedDecoder
DEFAULT_ILLEGAL_PROTOCOL_VERSION_LENGTH, DEFAULT_PROTOCOL_VERSION_LENGTH, protocolCodeLength
 
Fields inherited from class com.alipay.remoting.codec.AbstractBatchDecoder
COMPOSITE_CUMULATOR, MERGE_CUMULATOR
 
Constructor Summary
RpcProtocolDecoder(int protocolCodeLength)
           
 
Method Summary
protected  byte decodeProtocolVersion(io.netty.buffer.ByteBuf in)
          decode the protocol version
 
Methods inherited from class com.alipay.remoting.codec.ProtocolCodeBasedDecoder
decode, decodeProtocolCode
 
Methods inherited from class com.alipay.remoting.codec.AbstractBatchDecoder
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode
 
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
 
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, isSharable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface io.netty.channel.ChannelHandler
handlerAdded
 

Field Detail

MIN_PROTOCOL_CODE_WITH_VERSION

public static final int MIN_PROTOCOL_CODE_WITH_VERSION
See Also:
Constant Field Values
Constructor Detail

RpcProtocolDecoder

public RpcProtocolDecoder(int protocolCodeLength)
Method Detail

decodeProtocolVersion

protected byte decodeProtocolVersion(io.netty.buffer.ByteBuf in)
Description copied from class: ProtocolCodeBasedDecoder
decode the protocol version

Overrides:
decodeProtocolVersion in class ProtocolCodeBasedDecoder
Returns:
a byte to represent protocol version


Copyright © 2018. All rights reserved.