public class SingleProtocolDecoder extends InboundHandler<ByteBuffer,Void>
| Modifier and Type | Field and Description |
|---|---|
protected InboundHandler[] |
inboundHandlers |
protected ProtocolType |
supportedProtocol |
channel, dst, src| Constructor and Description |
|---|
SingleProtocolDecoder(ProtocolType supportedProtocol,
InboundHandler next) |
SingleProtocolDecoder(ProtocolType supportedProtocol,
InboundHandler[] next,
MemberProtocolEncoder encoder)
Decodes first 3 incoming bytes, validates against
supportedProtocol and, when
matching, replaces itself in the inbound pipeline with the next InboundHandlers. |
| Modifier and Type | Method and Description |
|---|---|
void |
handlerAdded()
Gets called when this ChannelHandler is added to the pipeline.
|
HandlerStatus |
onRead()
A callback to indicate that data is available in the src to be
processed.
|
protected void |
setupNextDecoder() |
protected void |
verifyProtocol(String incomingProtocol) |
initSrcBuffer, initSrcBufferdst, dst, interceptError, setChannel, src, srcprotected final InboundHandler[] inboundHandlers
protected final ProtocolType supportedProtocol
public SingleProtocolDecoder(ProtocolType supportedProtocol, InboundHandler next)
public SingleProtocolDecoder(ProtocolType supportedProtocol, InboundHandler[] next, MemberProtocolEncoder encoder)
supportedProtocol and, when
matching, replaces itself in the inbound pipeline with the next InboundHandlers.supportedProtocol - the ProtocolType supported by this ProtocolDecodernext - the InboundHandlers to replace this one in the inbound pipeline
upon match of protocol bytesencoder - a OutboundHandler that will be notified when matching protocol
bytes have been receivedpublic void handlerAdded()
ChannelHandlerhandlerAdded in class ChannelHandler<InboundHandler,ByteBuffer,Void>public HandlerStatus onRead()
InboundHandleronRead in class InboundHandler<ByteBuffer,Void>protected void setupNextDecoder()
protected void verifyProtocol(String incomingProtocol)
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.