Class RateLimitConnectHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelOutboundHandlerAdapter
-
- com.linkedin.alpini.netty4.handlers.RateLimitConnectHandler
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelOutboundHandler
@Sharable public class RateLimitConnectHandler extends io.netty.channel.ChannelOutboundHandlerAdapter
Created by acurtis on 3/19/18.
-
-
Constructor Summary
Constructors Constructor Description RateLimitConnectHandler(java.util.concurrent.ScheduledExecutorService scheduledExecutorService, long betweenConnectDelayMillis, long betweenFailureDelayMillis)
RateLimitConnectHandler(java.util.concurrent.ScheduledExecutorService scheduledExecutorService, java.util.function.LongSupplier betweenConnectDelayMillis, java.util.function.LongSupplier betweenFailureDelayMillis)
RateLimitConnectHandler(java.util.concurrent.ScheduledExecutorService scheduledExecutorService, java.util.function.LongSupplier betweenConnectDelayMillis, java.util.function.LongSupplier betweenFailureDelayMillis, java.util.function.LongSupplier maxConnectDelayMillis)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connect(io.netty.channel.ChannelHandlerContext ctx, java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress, io.netty.channel.ChannelPromise promise)
-
Methods inherited from class io.netty.channel.ChannelOutboundHandlerAdapter
bind, close, deregister, disconnect, flush, read, write
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Constructor Detail
-
RateLimitConnectHandler
public RateLimitConnectHandler(@Nonnull java.util.concurrent.ScheduledExecutorService scheduledExecutorService, long betweenConnectDelayMillis, long betweenFailureDelayMillis)
-
RateLimitConnectHandler
public RateLimitConnectHandler(@Nonnull java.util.concurrent.ScheduledExecutorService scheduledExecutorService, @Nonnull java.util.function.LongSupplier betweenConnectDelayMillis, @Nonnull java.util.function.LongSupplier betweenFailureDelayMillis)
-
RateLimitConnectHandler
public RateLimitConnectHandler(@Nonnull java.util.concurrent.ScheduledExecutorService scheduledExecutorService, @Nonnull java.util.function.LongSupplier betweenConnectDelayMillis, @Nonnull java.util.function.LongSupplier betweenFailureDelayMillis, @Nonnull java.util.function.LongSupplier maxConnectDelayMillis)
-
-
Method Detail
-
connect
public void connect(io.netty.channel.ChannelHandlerContext ctx, java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress, io.netty.channel.ChannelPromise promise) throws java.lang.Exception
- Specified by:
connect
in interfaceio.netty.channel.ChannelOutboundHandler
- Overrides:
connect
in classio.netty.channel.ChannelOutboundHandlerAdapter
- Throws:
java.lang.Exception
-
-