Class Router4Impl<C extends io.netty.channel.Channel>

    • Constructor Detail

      • Router4Impl

        public Router4Impl​(java.lang.String name,
                           java.lang.Class<? extends io.netty.channel.socket.ServerSocketChannel> channelClass,
                           io.netty.channel.EventLoopGroup bossPool,
                           io.netty.channel.EventLoopGroup workerPool,
                           io.netty.util.concurrent.EventExecutor workerExecutor,
                           ConnectionLimitHandler connectionLimit,
                           ActiveStreamsCountHandler activeStreamsCountHandler,
                           Http2SettingsFrameLogger http2SettingsFrameLogger,
                           RouterTimeoutProcessor timeoutProcessor,
                           io.netty.util.Timer nettyTimer,
                           java.util.Map<java.lang.String,​java.lang.Object> serverSocketOptions,
                           @Nonnull
                           ScatterGatherHelper<H,​P,​K,​R,​BasicFullHttpRequest,​io.netty.handler.codec.http.FullHttpResponse,​io.netty.handler.codec.http.HttpResponseStatus> scatterGatherHelper)
    • Method Detail

      • setPipelineSupplier

        public void setPipelineSupplier​(@Nonnull
                                        java.util.function.Supplier<Router4PipelineFactory<C>> pipelineSupplier)
      • bootstrap

        protected io.netty.bootstrap.ServerBootstrap bootstrap()
      • start

        public AsyncFuture<java.net.SocketAddress> start​(java.net.SocketAddress address)
        Specified by:
        start in interface Router
      • isBusyAutoReadDisable

        public boolean isBusyAutoReadDisable()
      • setBusyAutoReadDisable

        public void setBusyAutoReadDisable​(boolean busyAutoReadDisable)
      • setBusyAutoReadDisable

        public static void setBusyAutoReadDisable​(Router router,
                                                  boolean busyAutoReadDisable)
      • isBusyAutoReadDisable

        public static boolean isBusyAutoReadDisable​(Router router)
      • isShutdown

        public boolean isShutdown()
        Returns true if this resource has been shut down.
        Specified by:
        isShutdown in interface ShutdownableResource
        Returns:
        true if this resource has been shut down
      • isTerminated

        public boolean isTerminated()
        Returns true if the resource has completed shutting down. Note that isTerminated is never true unless shutdown was called first.
        Specified by:
        isTerminated in interface ShutdownableResource
        Returns:
        true if the resource has completed shutting down.
      • shutdown

        public void shutdown()
        Starts the shutdown process. It is recommended to perform the actual shutdown activity in a separate thread from the thread that calls shutdown
        Specified by:
        shutdown in interface Shutdownable
      • waitForShutdown

        public void waitForShutdown()
                             throws java.lang.InterruptedException,
                                    java.lang.IllegalStateException
        Waits for shutdown to complete
        Specified by:
        waitForShutdown in interface Shutdownable
        Throws:
        java.lang.InterruptedException - when the wait is interrupted
        java.lang.IllegalStateException - when the method is invoked when the shutdown has yet to be started
      • waitForShutdown

        public void waitForShutdown​(long timeoutInMs)
                             throws java.lang.InterruptedException,
                                    java.lang.IllegalStateException,
                                    java.util.concurrent.TimeoutException
        Waits for shutdown to complete with a timeout
        Specified by:
        waitForShutdown in interface Shutdownable
        Parameters:
        timeoutInMs - number of milliseconds to wait before throwing TimeoutException
        Throws:
        java.lang.InterruptedException - when the wait is interrupted
        java.lang.IllegalStateException - when the method is invoked when the shutdown has yet to be started
        java.util.concurrent.TimeoutException - when the operation times out
      • getNettyTimer

        public io.netty.util.Timer getNettyTimer()