@Stability.Internal public class SelectBucketHandler extends com.couchbase.client.core.deps.io.netty.channel.ChannelDuplexHandler
SelectBucketHandler is responsible for, selecting the right
bucket on this KV connection.
The reason this handler is in place that since Server 5.0 and RBAC (role based access control) one user after SASL/cert auth can have credentials for more than one bucket. To signal the server which bucket it should select, this command is used as usually the last step in the pipeline.
| Constructor and Description |
|---|
SelectBucketHandler(EndpointContext endpointContext,
String bucketName)
Creates a new
SelectBucketHandler. |
| Modifier and Type | Method and Description |
|---|---|
void |
channelActive(com.couchbase.client.core.deps.io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead(com.couchbase.client.core.deps.io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
connect(com.couchbase.client.core.deps.io.netty.channel.ChannelHandlerContext ctx,
SocketAddress remoteAddress,
SocketAddress localAddress,
com.couchbase.client.core.deps.io.netty.channel.ChannelPromise promise) |
bind, close, deregister, disconnect, flush, read, writechannelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharablepublic SelectBucketHandler(EndpointContext endpointContext, String bucketName)
SelectBucketHandler.endpointContext - the core context used to refer to values like the core id.bucketName - the bucket name to select.public void connect(com.couchbase.client.core.deps.io.netty.channel.ChannelHandlerContext ctx,
SocketAddress remoteAddress,
SocketAddress localAddress,
com.couchbase.client.core.deps.io.netty.channel.ChannelPromise promise)
connect in interface com.couchbase.client.core.deps.io.netty.channel.ChannelOutboundHandlerconnect in class com.couchbase.client.core.deps.io.netty.channel.ChannelDuplexHandlerpublic void channelActive(com.couchbase.client.core.deps.io.netty.channel.ChannelHandlerContext ctx)
channelActive in interface com.couchbase.client.core.deps.io.netty.channel.ChannelInboundHandlerchannelActive in class com.couchbase.client.core.deps.io.netty.channel.ChannelInboundHandlerAdapterpublic void channelRead(com.couchbase.client.core.deps.io.netty.channel.ChannelHandlerContext ctx,
Object msg)
channelRead in interface com.couchbase.client.core.deps.io.netty.channel.ChannelInboundHandlerchannelRead in class com.couchbase.client.core.deps.io.netty.channel.ChannelInboundHandlerAdapterCopyright © 2021 Couchbase, Inc.. All rights reserved.