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 InboundHandler s. |
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, initSrcBuffer
dst, dst, interceptError, setChannel, src, src
protected 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 InboundHandler
s.supportedProtocol
- the ProtocolType
supported by this ProtocolDecoder
next
- the InboundHandler
s 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()
ChannelHandler
handlerAdded
in class ChannelHandler<InboundHandler,ByteBuffer,Void>
public HandlerStatus onRead()
InboundHandler
onRead
in class InboundHandler<ByteBuffer,Void>
protected void setupNextDecoder()
protected void verifyProtocol(String incomingProtocol)
Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.