T
- The subscriber type@Internal public class HandlerSubscriber<T> extends io.netty.channel.ChannelDuplexHandler implements org.reactivestreams.Subscriber<T>
Constructor and Description |
---|
HandlerSubscriber(io.netty.util.concurrent.EventExecutor executor)
Create a new handler subscriber with the default low and high watermarks.
|
Modifier and Type | Method and Description |
---|---|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRegistered(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelWritabilityChanged(io.netty.channel.ChannelHandlerContext ctx) |
protected void |
complete()
Override for custom completion handling.
|
protected void |
error(java.lang.Throwable error)
Override for custom error handling.
|
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Throwable cause) |
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
void |
handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) |
void |
onComplete() |
void |
onError(java.lang.Throwable error) |
void |
onNext(T t) |
void |
onSubscribe(org.reactivestreams.Subscription subscription) |
bind, close, connect, deregister, disconnect, flush, read, write
public HandlerSubscriber(io.netty.util.concurrent.EventExecutor executor)
The supplied executor must be the same event loop as the event loop that this handler is eventually registered with, if not, an exception will be thrown when the handler is registered.
executor
- The executor to execute asynchronous events from the publisher on.protected void error(java.lang.Throwable error)
error
- The error to handle.protected void complete()
public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
handlerAdded
in interface io.netty.channel.ChannelHandler
handlerAdded
in class io.netty.channel.ChannelHandlerAdapter
public void channelRegistered(io.netty.channel.ChannelHandlerContext ctx)
channelRegistered
in interface io.netty.channel.ChannelInboundHandler
channelRegistered
in class io.netty.channel.ChannelInboundHandlerAdapter
public void channelWritabilityChanged(io.netty.channel.ChannelHandlerContext ctx)
channelWritabilityChanged
in interface io.netty.channel.ChannelInboundHandler
channelWritabilityChanged
in class io.netty.channel.ChannelInboundHandlerAdapter
public void channelActive(io.netty.channel.ChannelHandlerContext ctx)
channelActive
in interface io.netty.channel.ChannelInboundHandler
channelActive
in class io.netty.channel.ChannelInboundHandlerAdapter
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
channelInactive
in interface io.netty.channel.ChannelInboundHandler
channelInactive
in class io.netty.channel.ChannelInboundHandlerAdapter
public void handlerRemoved(io.netty.channel.ChannelHandlerContext ctx)
handlerRemoved
in interface io.netty.channel.ChannelHandler
handlerRemoved
in class io.netty.channel.ChannelHandlerAdapter
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, java.lang.Throwable cause)
exceptionCaught
in interface io.netty.channel.ChannelHandler
exceptionCaught
in interface io.netty.channel.ChannelInboundHandler
exceptionCaught
in class io.netty.channel.ChannelInboundHandlerAdapter
public void onSubscribe(org.reactivestreams.Subscription subscription)
onSubscribe
in interface org.reactivestreams.Subscriber<T>
public void onError(java.lang.Throwable error)
onError
in interface org.reactivestreams.Subscriber<T>
public void onComplete()
onComplete
in interface org.reactivestreams.Subscriber<T>