public class NettyChannelHandlerBridge<IN,OUT>
extends io.netty.channel.ChannelDuplexHandler
ChannelInboundHandler implementation that passes data to a Reactor ChannelStream.| Modifier and Type | Class and Description |
|---|---|
static class |
NettyChannelHandlerBridge.ChannelInputSubscriberEvent<IN>
|
| Modifier and Type | Field and Description |
|---|---|
protected static AtomicIntegerFieldUpdater<NettyChannelHandlerBridge> |
CHANNEL_REF |
protected NettyChannelStream<IN,OUT> |
channelStream |
protected PushSubscription<IN> |
channelSubscription |
protected ReactorChannelHandler<IN,OUT,ChannelStream<IN,OUT>> |
handler |
protected static org.slf4j.Logger |
log |
| Constructor and Description |
|---|
NettyChannelHandlerBridge(ReactorChannelHandler<IN,OUT,ChannelStream<IN,OUT>> handler,
NettyChannelStream<IN,OUT> channelStream) |
| Modifier and Type | Method and Description |
|---|---|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
channelReadComplete(io.netty.channel.ChannelHandlerContext ctx) |
protected static io.netty.buffer.ByteBuf |
convertBufferToByteBuff(io.netty.channel.ChannelHandlerContext ctx,
Buffer data) |
protected void |
doOnSubscribe(io.netty.channel.ChannelHandlerContext ctx,
org.reactivestreams.Subscription s) |
protected void |
doOnTerminate(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelFuture last,
io.netty.channel.ChannelPromise promise) |
protected io.netty.channel.ChannelFuture |
doOnWrite(Object data,
io.netty.channel.ChannelHandlerContext ctx) |
protected void |
doRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
NettyChannelStream<IN,OUT> |
getChannelStream() |
ReactorChannelHandler<IN,OUT,ChannelStream<IN,OUT>> |
getHandler() |
PushSubscription<IN> |
subscription() |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt) |
void |
write(io.netty.channel.ChannelHandlerContext ctx,
Object msg,
io.netty.channel.ChannelPromise promise) |
bind, close, connect, deregister, disconnect, flush, readchannelRegistered, channelUnregistered, channelWritabilityChangedhandlerAdded, handlerRemoved, isSharableprotected static final org.slf4j.Logger log
protected final ReactorChannelHandler<IN,OUT,ChannelStream<IN,OUT>> handler
protected final NettyChannelStream<IN,OUT> channelStream
protected PushSubscription<IN> channelSubscription
protected static final AtomicIntegerFieldUpdater<NettyChannelHandlerBridge> CHANNEL_REF
public NettyChannelHandlerBridge(ReactorChannelHandler<IN,OUT,ChannelStream<IN,OUT>> handler, NettyChannelStream<IN,OUT> channelStream)
public PushSubscription<IN> subscription()
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt)
throws Exception
userEventTriggered in interface io.netty.channel.ChannelInboundHandleruserEventTriggered in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelActive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelActive in interface io.netty.channel.ChannelInboundHandlerchannelActive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelReadComplete in interface io.netty.channel.ChannelInboundHandlerchannelReadComplete in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
throws Exception
channelRead in interface io.netty.channel.ChannelInboundHandlerchannelRead in class io.netty.channel.ChannelInboundHandlerAdapterExceptionprotected final void doRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
public void write(io.netty.channel.ChannelHandlerContext ctx,
Object msg,
io.netty.channel.ChannelPromise promise)
throws Exception
write in interface io.netty.channel.ChannelOutboundHandlerwrite in class io.netty.channel.ChannelDuplexHandlerExceptionpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
throws Exception
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterExceptionprotected io.netty.channel.ChannelFuture doOnWrite(Object data, io.netty.channel.ChannelHandlerContext ctx)
protected static io.netty.buffer.ByteBuf convertBufferToByteBuff(io.netty.channel.ChannelHandlerContext ctx,
Buffer data)
protected void doOnTerminate(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelFuture last,
io.netty.channel.ChannelPromise promise)
protected void doOnSubscribe(io.netty.channel.ChannelHandlerContext ctx,
org.reactivestreams.Subscription s)
public ReactorChannelHandler<IN,OUT,ChannelStream<IN,OUT>> getHandler()
public NettyChannelStream<IN,OUT> getChannelStream()
Copyright © 2016. All rights reserved.