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, 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(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.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,
java.lang.Throwable cause)
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterpublic 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>