public class MemcacheProtocolVerificationHandler
extends com.couchbase.client.core.deps.io.netty.channel.ChannelDuplexHandler
This handler is purely here for defense in-depth against malformed packets. For performance reasons, it only checks the basic structure and length fields and cannot do any deep-packet inspection.
Constructor and Description |
---|
MemcacheProtocolVerificationHandler(EndpointContext endpointContext)
Creates a new
MemcacheProtocolVerificationHandler . |
Modifier and Type | Method and Description |
---|---|
void |
channelRead(com.couchbase.client.core.deps.io.netty.channel.ChannelHandlerContext ctx,
Object response)
Makes sure that incoming responses are valid.
|
void |
write(com.couchbase.client.core.deps.io.netty.channel.ChannelHandlerContext ctx,
Object request,
com.couchbase.client.core.deps.io.netty.channel.ChannelPromise promise)
Makes sure that outgoing requests are valid.
|
bind, close, connect, deregister, disconnect, flush, read
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
public MemcacheProtocolVerificationHandler(EndpointContext endpointContext)
MemcacheProtocolVerificationHandler
.endpointContext
- the core context used to refer to values like the core id.public void write(com.couchbase.client.core.deps.io.netty.channel.ChannelHandlerContext ctx, Object request, com.couchbase.client.core.deps.io.netty.channel.ChannelPromise promise)
write
in interface com.couchbase.client.core.deps.io.netty.channel.ChannelOutboundHandler
write
in class com.couchbase.client.core.deps.io.netty.channel.ChannelDuplexHandler
ctx
- the context to use.request
- the request to check.promise
- the write promise.public void channelRead(com.couchbase.client.core.deps.io.netty.channel.ChannelHandlerContext ctx, Object response)
channelRead
in interface com.couchbase.client.core.deps.io.netty.channel.ChannelInboundHandler
channelRead
in class com.couchbase.client.core.deps.io.netty.channel.ChannelInboundHandlerAdapter
ctx
- the context to use.response
- the response to check.Copyright © 2020 Couchbase, Inc.. All rights reserved.