Package org.apache.drill.exec.rpc
Class AbstractHandshakeHandler<T extends com.google.protobuf.MessageLite>
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.handler.codec.MessageToMessageDecoder<InboundRpcMessage>
org.apache.drill.exec.rpc.AbstractHandshakeHandler<T>
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
- Direct Known Subclasses:
BasicServer.ServerHandshakeHandler
public abstract class AbstractHandshakeHandler<T extends com.google.protobuf.MessageLite>
extends io.netty.handler.codec.MessageToMessageDecoder<InboundRpcMessage>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
protected final com.google.protobuf.Internal.EnumLite
protected final com.google.protobuf.Parser<T>
-
Constructor Summary
ConstructorDescriptionAbstractHandshakeHandler
(com.google.protobuf.Internal.EnumLite handshakeType, com.google.protobuf.Parser<T> parser) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
consumeHandshake
(io.netty.channel.ChannelHandlerContext ctx, T msg) protected void
decode
(io.netty.channel.ChannelHandlerContext ctx, InboundRpcMessage inbound, List<Object> outputs) Methods inherited from class io.netty.handler.codec.MessageToMessageDecoder
acceptInboundMessage, channelRead
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, 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, handlerRemoved
-
Field Details
-
handshakeType
protected final com.google.protobuf.Internal.EnumLite handshakeType -
parser
-
coordinationId
protected volatile int coordinationId
-
-
Constructor Details
-
AbstractHandshakeHandler
public AbstractHandshakeHandler(com.google.protobuf.Internal.EnumLite handshakeType, com.google.protobuf.Parser<T> parser)
-
-
Method Details
-
decode
protected void decode(io.netty.channel.ChannelHandlerContext ctx, InboundRpcMessage inbound, List<Object> outputs) throws Exception - Specified by:
decode
in classio.netty.handler.codec.MessageToMessageDecoder<InboundRpcMessage>
- Throws:
Exception
-
consumeHandshake
protected abstract void consumeHandshake(io.netty.channel.ChannelHandlerContext ctx, T msg) throws Exception - Throws:
Exception
-