public class SingleProtocolDecoder extends com.hazelcast.internal.networking.InboundHandler<ByteBuffer,Void>
Modifier and Type | Field and Description |
---|---|
protected com.hazelcast.internal.networking.InboundHandler[] |
inboundHandlers |
protected ProtocolType |
supportedProtocol |
Constructor and Description |
---|
SingleProtocolDecoder(ProtocolType supportedProtocol,
com.hazelcast.internal.networking.InboundHandler next) |
SingleProtocolDecoder(ProtocolType supportedProtocol,
com.hazelcast.internal.networking.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.
|
com.hazelcast.internal.networking.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
protected final com.hazelcast.internal.networking.InboundHandler[] inboundHandlers
protected final ProtocolType supportedProtocol
public SingleProtocolDecoder(ProtocolType supportedProtocol, com.hazelcast.internal.networking.InboundHandler next)
public SingleProtocolDecoder(ProtocolType supportedProtocol, com.hazelcast.internal.networking.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()
com.hazelcast.internal.networking.ChannelHandler
handlerAdded
in class com.hazelcast.internal.networking.ChannelHandler<com.hazelcast.internal.networking.InboundHandler,ByteBuffer,Void>
public com.hazelcast.internal.networking.HandlerStatus onRead()
com.hazelcast.internal.networking.InboundHandler
onRead
in class com.hazelcast.internal.networking.InboundHandler<ByteBuffer,Void>
protected void setupNextDecoder()
protected void verifyProtocol(String incomingProtocol)
Copyright © 2019 Hazelcast, Inc.. All rights reserved.