Search in sources :

Example 11 with IoContext

use of com.couchbase.client.core.io.IoContext in project couchbase-jvm-clients by couchbase.

the class TrafficCaptureHandler method channelActive.

@Override
public void channelActive(ChannelHandlerContext ctx) {
    ioContext = new IoContext(endpointContext, ctx.channel().localAddress(), ctx.channel().remoteAddress(), endpointContext.bucket());
    ctx.fireChannelActive();
}
Also used : IoContext(com.couchbase.client.core.io.IoContext)

Example 12 with IoContext

use of com.couchbase.client.core.io.IoContext in project couchbase-jvm-clients by couchbase.

the class NonChunkedHttpMessageHandler method channelActive.

/**
 * When this channel is marked active it also needs to propagate that to the aggregator.
 *
 * @param ctx the channel handler context.
 */
@Override
public void channelActive(final ChannelHandlerContext ctx) throws Exception {
    ioContext = new IoContext(endpointContext, ctx.channel().localAddress(), ctx.channel().remoteAddress(), endpointContext.bucket());
    channelContext = new HttpChannelContext(ctx.channel().id());
    remoteHost = endpoint.remoteHostname() + ":" + endpoint.remotePort();
    ctx.pipeline().get(HttpObjectAggregator.class).channelActive(ctx);
    ctx.fireChannelActive();
}
Also used : HttpObjectAggregator(com.couchbase.client.core.deps.io.netty.handler.codec.http.HttpObjectAggregator) IoContext(com.couchbase.client.core.io.IoContext)

Aggregations

IoContext (com.couchbase.client.core.io.IoContext)12 TimeoutException (java.util.concurrent.TimeoutException)5 CoreContext (com.couchbase.client.core.CoreContext)1 CbTracing (com.couchbase.client.core.cnc.CbTracing)1 EventBus (com.couchbase.client.core.cnc.EventBus)1 RequestSpan (com.couchbase.client.core.cnc.RequestSpan)1 RequestTracer (com.couchbase.client.core.cnc.RequestTracer)1 TracingIdentifiers (com.couchbase.client.core.cnc.TracingIdentifiers)1 ChannelClosedProactivelyEvent (com.couchbase.client.core.cnc.events.io.ChannelClosedProactivelyEvent)1 CollectionOutdatedHandledEvent (com.couchbase.client.core.cnc.events.io.CollectionOutdatedHandledEvent)1 InvalidPacketDetectedEvent (com.couchbase.client.core.cnc.events.io.InvalidPacketDetectedEvent)1 InvalidRequestDetectedEvent (com.couchbase.client.core.cnc.events.io.InvalidRequestDetectedEvent)1 KeyValueErrorMapCodeHandledEvent (com.couchbase.client.core.cnc.events.io.KeyValueErrorMapCodeHandledEvent)1 NotMyVbucketReceivedEvent (com.couchbase.client.core.cnc.events.io.NotMyVbucketReceivedEvent)1 UnknownResponseReceivedEvent (com.couchbase.client.core.cnc.events.io.UnknownResponseReceivedEvent)1 UnknownResponseStatusReceivedEvent (com.couchbase.client.core.cnc.events.io.UnknownResponseStatusReceivedEvent)1 UnsupportedResponseTypeReceivedEvent (com.couchbase.client.core.cnc.events.io.UnsupportedResponseTypeReceivedEvent)1 ConfigurationProvider (com.couchbase.client.core.config.ConfigurationProvider)1 MemcachedBucketConfig (com.couchbase.client.core.config.MemcachedBucketConfig)1 ProposedBucketConfigContext (com.couchbase.client.core.config.ProposedBucketConfigContext)1