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, writepublic 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.ChannelHandlerhandlerAdded in class io.netty.channel.ChannelHandlerAdapterpublic void channelRegistered(io.netty.channel.ChannelHandlerContext ctx)
channelRegistered in interface io.netty.channel.ChannelInboundHandlerchannelRegistered in class io.netty.channel.ChannelInboundHandlerAdapterpublic void channelWritabilityChanged(io.netty.channel.ChannelHandlerContext ctx)
channelWritabilityChanged in interface io.netty.channel.ChannelInboundHandlerchannelWritabilityChanged in class io.netty.channel.ChannelInboundHandlerAdapterpublic void channelActive(io.netty.channel.ChannelHandlerContext ctx)
channelActive in interface io.netty.channel.ChannelInboundHandlerchannelActive in class io.netty.channel.ChannelInboundHandlerAdapterpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterpublic void handlerRemoved(io.netty.channel.ChannelHandlerContext ctx)
handlerRemoved in interface io.netty.channel.ChannelHandlerhandlerRemoved in class io.netty.channel.ChannelHandlerAdapterpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterpublic 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>