Package io.netty.handler.codec.http2
Class ActiveStreamsCountHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.handler.codec.http2.ActiveStreamsCountHandler
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
@Sharable
public class ActiveStreamsCountHandler
extends io.netty.channel.ChannelInboundHandlerAdapter
Counts the number of the active HTTP/2 Streams
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Return the current active streams.void
handlerAdded
(io.netty.channel.ChannelHandlerContext ctx) void
handlerRemoved
(io.netty.channel.ChannelHandlerContext ctx) void
userEventTriggered
(io.netty.channel.ChannelHandlerContext ctx, Object evt) Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, isSharable
-
Constructor Details
-
ActiveStreamsCountHandler
public ActiveStreamsCountHandler()
-
-
Method Details
-
getActiveStreamsCount
public int getActiveStreamsCount()Return the current active streams.- Returns:
- number of streams.
-
userEventTriggered
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt) throws Exception - Specified by:
userEventTriggered
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
userEventTriggered
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
handlerAdded
- Specified by:
handlerAdded
in interfaceio.netty.channel.ChannelHandler
- Overrides:
handlerAdded
in classio.netty.channel.ChannelHandlerAdapter
- Throws:
Exception
-
handlerRemoved
- Specified by:
handlerRemoved
in interfaceio.netty.channel.ChannelHandler
- Overrides:
handlerRemoved
in classio.netty.channel.ChannelHandlerAdapter
- Throws:
Exception
-