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 java.util.concurrent.atomic.AtomicIntegerFieldUpdater<NettyChannelHandlerBridge> |
CHANNEL_REF |
protected NettyChannelStream<IN,OUT> |
channelStream |
protected reactor.rx.subscription.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,
java.lang.Object msg) |
void |
channelReadComplete(io.netty.channel.ChannelHandlerContext ctx) |
protected static io.netty.buffer.ByteBuf |
convertBufferToByteBuff(io.netty.channel.ChannelHandlerContext ctx,
reactor.io.buffer.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(java.lang.Object data,
io.netty.channel.ChannelHandlerContext ctx) |
protected void |
doRead(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Throwable cause) |
NettyChannelStream<IN,OUT> |
getChannelStream() |
ReactorChannelHandler<IN,OUT,ChannelStream<IN,OUT>> |
getHandler() |
reactor.rx.subscription.PushSubscription<IN> |
subscription() |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object evt) |
void |
write(io.netty.channel.ChannelHandlerContext ctx,
java.lang.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 reactor.rx.subscription.PushSubscription<IN> channelSubscription
protected static final java.util.concurrent.atomic.AtomicIntegerFieldUpdater<NettyChannelHandlerBridge> CHANNEL_REF
public NettyChannelHandlerBridge(ReactorChannelHandler<IN,OUT,ChannelStream<IN,OUT>> handler, NettyChannelStream<IN,OUT> channelStream)
public reactor.rx.subscription.PushSubscription<IN> subscription()
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object evt)
throws java.lang.Exception
userEventTriggered in interface io.netty.channel.ChannelInboundHandleruserEventTriggered in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exceptionpublic void channelActive(io.netty.channel.ChannelHandlerContext ctx)
throws java.lang.Exception
channelActive in interface io.netty.channel.ChannelInboundHandlerchannelActive in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exceptionpublic void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx)
throws java.lang.Exception
channelReadComplete in interface io.netty.channel.ChannelInboundHandlerchannelReadComplete in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exceptionpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws java.lang.Exception
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exceptionpublic void channelRead(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg)
throws java.lang.Exception
channelRead in interface io.netty.channel.ChannelInboundHandlerchannelRead in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exceptionprotected final void doRead(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg)
public void write(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg,
io.netty.channel.ChannelPromise promise)
throws java.lang.Exception
write in interface io.netty.channel.ChannelOutboundHandlerwrite in class io.netty.channel.ChannelDuplexHandlerjava.lang.Exceptionpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Throwable cause)
throws java.lang.Exception
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exceptionprotected io.netty.channel.ChannelFuture doOnWrite(java.lang.Object data,
io.netty.channel.ChannelHandlerContext ctx)
protected static io.netty.buffer.ByteBuf convertBufferToByteBuff(io.netty.channel.ChannelHandlerContext ctx,
reactor.io.buffer.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()