T
- The subscriber type@Internal public class HandlerSubscriber<T> extends io.netty.channel.ChannelDuplexHandler implements 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(Throwable error)
Override for custom error handling.
|
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
void |
handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) |
void |
onComplete() |
void |
onError(Throwable error) |
void |
onNext(T t) |
void |
onSubscribe(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(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, 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(Subscription subscription)
onSubscribe
in interface Subscriber<T>
public void onNext(T t)
onNext
in interface Subscriber<T>
public void onError(Throwable error)
onError
in interface Subscriber<T>
public void onComplete()
onComplete
in interface Subscriber<T>