Class HandlerSubscriber<T>
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
software.amazon.awssdk.http.nio.netty.internal.nrs.HandlerSubscriber<T>
- All Implemented Interfaces:
- io.netty.channel.ChannelHandler,- io.netty.channel.ChannelInboundHandler,- io.netty.channel.ChannelOutboundHandler,- org.reactivestreams.Subscriber<T>
@SdkInternalApi
public class HandlerSubscriber<T>
extends io.netty.channel.ChannelDuplexHandler
implements org.reactivestreams.Subscriber<T>
Subscriber that publishes received messages to the handler pipeline.
 This class contains source imported from https://github.com/playframework/netty-reactive-streams,
 licensed under the Apache License 2.0, available at the time of the fork (1/31/2020) here:
 https://github.com/playframework/netty-reactive-streams/blob/master/LICENSE.txt
 All original source licensed under the Apache License 2.0 by playframework. All modifications are
 licensed under the Apache License 2.0 by Amazon Web Services.
- 
Nested Class SummaryNested classes/interfaces inherited from interface io.netty.channel.ChannelHandlerio.netty.channel.ChannelHandler.Sharable
- 
Constructor SummaryConstructorsConstructorDescriptionHandlerSubscriber(io.netty.util.concurrent.EventExecutor executor) Create a new handler subscriber with the default low and high watermarks.HandlerSubscriber(io.netty.util.concurrent.EventExecutor executor, long demandLowWatermark, long demandHighWatermark) Create a new handler subscriber.
- 
Method SummaryModifier and TypeMethodDescriptionvoidchannelActive(io.netty.channel.ChannelHandlerContext ctx) voidchannelInactive(io.netty.channel.ChannelHandlerContext ctx) voidchannelRegistered(io.netty.channel.ChannelHandlerContext ctx) voidchannelWritabilityChanged(io.netty.channel.ChannelHandlerContext ctx) voidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) voidhandlerAdded(io.netty.channel.ChannelHandlerContext ctx) voidhandlerRemoved(io.netty.channel.ChannelHandlerContext ctx) voidvoidvoidvoidonSubscribe(org.reactivestreams.Subscription subscription) Methods inherited from class io.netty.channel.ChannelDuplexHandlerbind, close, connect, deregister, disconnect, flush, read, writeMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapterchannelRead, channelReadComplete, channelUnregistered, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapterisSharable
- 
Constructor Details- 
HandlerSubscriberpublic HandlerSubscriber(io.netty.util.concurrent.EventExecutor executor, long demandLowWatermark, long demandHighWatermark) Create a new handler subscriber. 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.- Parameters:
- executor- The executor to execute asynchronous events from the publisher on.
- demandLowWatermark- The low watermark for demand. When demand drops below this, more will be requested.
- demandHighWatermark- The high watermark for demand. This is the maximum that will be requested.
 
- 
HandlerSubscriberpublic HandlerSubscriber(io.netty.util.concurrent.EventExecutor executor) Create a new handler subscriber with the default low and high watermarks. 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.- Parameters:
- executor- The executor to execute asynchronous events from the publisher on.
- See Also:
 
 
- 
- 
Method Details- 
handlerAdded
- 
channelRegistered
- 
channelWritabilityChanged- Specified by:
- channelWritabilityChangedin interface- io.netty.channel.ChannelInboundHandler
- Overrides:
- channelWritabilityChangedin class- io.netty.channel.ChannelInboundHandlerAdapter
- Throws:
- Exception
 
- 
channelActive
- 
channelInactive
- 
handlerRemoved
- 
exceptionCaughtpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception - Specified by:
- exceptionCaughtin interface- io.netty.channel.ChannelHandler
- Specified by:
- exceptionCaughtin interface- io.netty.channel.ChannelInboundHandler
- Overrides:
- exceptionCaughtin class- io.netty.channel.ChannelInboundHandlerAdapter
- Throws:
- Exception
 
- 
onSubscribepublic void onSubscribe(org.reactivestreams.Subscription subscription) - Specified by:
- onSubscribein interface- org.reactivestreams.Subscriber<T>
 
- 
onNext
- 
onError
- 
onCompletepublic void onComplete()- Specified by:
- onCompletein interface- org.reactivestreams.Subscriber<T>
 
 
-