Class Router4<C extends io.netty.channel.Channel>
java.lang.Object
com.linkedin.alpini.router.impl.netty4.Router4<C>
- All Implemented Interfaces:
Router.Builder
,Router.PipelineFactory<io.netty.channel.ChannelHandler>
public class Router4<C extends io.netty.channel.Channel>
extends Object
implements Router.Builder, Router.PipelineFactory<io.netty.channel.ChannelHandler>
-
Field Summary
Fields inherited from interface com.linkedin.alpini.router.impl.Router.Builder
HANDSHAKE_TIMEOUT_MILLIS, MINIMUM_IDLE_TIMEOUT_MILLIS, MINIMUM_MAX_CHUNK_SIZE, MINIMUM_MAX_CONTENT_LENGTH, MINIMUM_MAX_HEADER_SIZE, MINIMUM_MAX_INITIAL_LINE_LENGTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRouter.PipelineFactory<io.netty.channel.ChannelHandler>
addBeforeChunkAggregator
(String name, Supplier<? extends io.netty.channel.ChannelHandler> supplier) Router.PipelineFactory<io.netty.channel.ChannelHandler>
addBeforeHttpRequestHandler
(String name, Supplier<? extends io.netty.channel.ChannelHandler> supplier) Router.PipelineFactory<io.netty.channel.ChannelHandler>
addBeforeHttpServerCodec
(String name, Supplier<? extends io.netty.channel.ChannelHandler> supplier) Router.PipelineFactory<io.netty.channel.ChannelHandler>
addBeforeIdleStateHandler
(String name, Supplier<? extends io.netty.channel.ChannelHandler> supplier) <T> Router.Builder
addBootstrapFilter
(Function<T, T> function) appWorkerChannelMaxMemorySize
(long maxChannelMemorySize) appWorkerCorePoolSize
(int corePoolSize) appWorkerKeepAliveSeconds
(long appWorkerKeepAliveSeconds) appWorkerTotalMaxMemorySize
(long maxTotalMemorySize) <CHANNEL_PIPELINE>
Router.BuilderbeforeChunkAggregator
(Class<CHANNEL_PIPELINE> pipelineClass, Consumer<CHANNEL_PIPELINE> consumer) <CHANNEL_PIPELINE>
Router.BuilderbeforeHttpRequestHandler
(Class<CHANNEL_PIPELINE> pipelineClass, Consumer<CHANNEL_PIPELINE> consumer) <CHANNEL_PIPELINE>
Router.BuilderbeforeHttpServerCodec
(Class<CHANNEL_PIPELINE> pipelineClass, Consumer<CHANNEL_PIPELINE> consumer) <CHANNEL_PIPELINE>
Router.BuilderbeforeIdleStateHandler
(Class<CHANNEL_PIPELINE> pipelineClass, Consumer<CHANNEL_PIPELINE> consumer) <POOL_TYPE>
Router.BuilderbossPoolBuilder
(Class<POOL_TYPE> poolClass, Function<Executor, POOL_TYPE> builder) bossPoolSize
(int bossPoolSize) build()
builder()
connectionLimit
(int connectionLimit) connectionLimit
(IntSupplier connectionLimit) enableInboundHttp2
(boolean enableHttp2) <R extends ShutdownableResource,
F extends ResourceRegistry.Factory<R>>
FhandshakeTimeout
(long time, TimeUnit unit) http2HeaderTableSize
(int http2HeaderTableSize) http2InitialWindowSize
(int http2InitialWindowSize) http2MaxConcurrentStreams
(int http2MaxConcurrentStreams) http2MaxFrameSize
(int http2MaxFrameSize) http2MaxHeaderListSize
(int http2MaxHeaderListSize) idleTimeout
(long time, TimeUnit unit) <POOL_TYPE>
Router.BuilderioWorkerPoolBuilder
(Class<POOL_TYPE> poolClass, Function<Executor, POOL_TYPE> builder) ioWorkerPoolSize
(int ioWorkerPoolSize) maxChunkSize
(int maxChunkSize) maxContentLength
(long maxContentLength) maxHeaderSize
(int maxHeaderSize) maxInitialLineLength
(int maxInitialLineLength) <CHANNEL_HANDLER>
Router.PipelineFactory<CHANNEL_HANDLER>pipelineFactory
(Class<CHANNEL_HANDLER> handlerClass) resourceRegistry
(ResourceRegistry resourceRegistry) serverSocketChannel
(Class<?> serverSocketChannel) serverSocketOptions
(String key, Object value) serverSocketOptions
(Map<String, Object> serverSocketOptions) threadFactory
(ThreadFactory threadFactory) timeoutProcessor
(RouterTimeoutProcessor timeoutProcessor) useCustomMultiplexHandler
(boolean useCustomMultiplexHandler) workerExecutor
(Executor workerExecutor) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.linkedin.alpini.router.impl.Router.Builder
timeoutProcessor
-
Constructor Details
-
Router4
-
-
Method Details
-
nettyVersion
- Specified by:
nettyVersion
in interfaceRouter.Builder
-
name
- Specified by:
name
in interfaceRouter.Builder
-
resourceRegistry
- Specified by:
resourceRegistry
in interfaceRouter.Builder
-
threadFactory
- Specified by:
threadFactory
in interfaceRouter.Builder
-
serverSocketChannel
- Specified by:
serverSocketChannel
in interfaceRouter.Builder
-
bossPoolSize
- Specified by:
bossPoolSize
in interfaceRouter.Builder
-
ioWorkerPoolSize
- Specified by:
ioWorkerPoolSize
in interfaceRouter.Builder
-
ioWorkerPoolBuilder
public <POOL_TYPE> Router.Builder ioWorkerPoolBuilder(@Nonnull Class<POOL_TYPE> poolClass, @Nonnull Function<Executor, POOL_TYPE> builder) - Specified by:
ioWorkerPoolBuilder
in interfaceRouter.Builder
-
bossPoolBuilder
public <POOL_TYPE> Router.Builder bossPoolBuilder(@Nonnull Class<POOL_TYPE> poolClass, @Nonnull Function<Executor, POOL_TYPE> builder) - Specified by:
bossPoolBuilder
in interfaceRouter.Builder
-
executor
- Specified by:
executor
in interfaceRouter.Builder
-
workerExecutor
- Specified by:
workerExecutor
in interfaceRouter.Builder
-
appWorkerCorePoolSize
- Specified by:
appWorkerCorePoolSize
in interfaceRouter.Builder
-
appWorkerChannelMaxMemorySize
- Specified by:
appWorkerChannelMaxMemorySize
in interfaceRouter.Builder
-
appWorkerTotalMaxMemorySize
- Specified by:
appWorkerTotalMaxMemorySize
in interfaceRouter.Builder
-
appWorkerKeepAliveSeconds
- Specified by:
appWorkerKeepAliveSeconds
in interfaceRouter.Builder
-
timeoutProcessor
- Specified by:
timeoutProcessor
in interfaceRouter.Builder
-
connectionLimit
- Specified by:
connectionLimit
in interfaceRouter.Builder
-
connectionLimit
- Specified by:
connectionLimit
in interfaceRouter.Builder
-
serverSocketOptions
- Specified by:
serverSocketOptions
in interfaceRouter.Builder
-
serverSocketOptions
- Specified by:
serverSocketOptions
in interfaceRouter.Builder
-
maxHeaderSize
- Specified by:
maxHeaderSize
in interfaceRouter.Builder
-
maxInitialLineLength
- Specified by:
maxInitialLineLength
in interfaceRouter.Builder
-
maxChunkSize
- Specified by:
maxChunkSize
in interfaceRouter.Builder
-
maxContentLength
- Specified by:
maxContentLength
in interfaceRouter.Builder
-
idleTimeout
- Specified by:
idleTimeout
in interfaceRouter.Builder
-
handshakeTimeout
- Specified by:
handshakeTimeout
in interfaceRouter.Builder
-
enableInboundHttp2
- Specified by:
enableInboundHttp2
in interfaceRouter.Builder
-
useCustomMultiplexHandler
- Specified by:
useCustomMultiplexHandler
in interfaceRouter.Builder
-
http2MaxConcurrentStreams
- Specified by:
http2MaxConcurrentStreams
in interfaceRouter.Builder
-
http2MaxFrameSize
- Specified by:
http2MaxFrameSize
in interfaceRouter.Builder
-
http2InitialWindowSize
- Specified by:
http2InitialWindowSize
in interfaceRouter.Builder
-
http2HeaderTableSize
- Specified by:
http2HeaderTableSize
in interfaceRouter.Builder
-
http2MaxHeaderListSize
- Specified by:
http2MaxHeaderListSize
in interfaceRouter.Builder
-
addBootstrapFilter
- Specified by:
addBootstrapFilter
in interfaceRouter.Builder
-
pipelineFactory
public <CHANNEL_HANDLER> Router.PipelineFactory<CHANNEL_HANDLER> pipelineFactory(@Nonnull Class<CHANNEL_HANDLER> handlerClass) - Specified by:
pipelineFactory
in interfaceRouter.Builder
-
beforeHttpServerCodec
public <CHANNEL_PIPELINE> Router.Builder beforeHttpServerCodec(@Nonnull Class<CHANNEL_PIPELINE> pipelineClass, @Nonnull Consumer<CHANNEL_PIPELINE> consumer) - Specified by:
beforeHttpServerCodec
in interfaceRouter.Builder
-
beforeChunkAggregator
public <CHANNEL_PIPELINE> Router.Builder beforeChunkAggregator(@Nonnull Class<CHANNEL_PIPELINE> pipelineClass, @Nonnull Consumer<CHANNEL_PIPELINE> consumer) - Specified by:
beforeChunkAggregator
in interfaceRouter.Builder
-
beforeIdleStateHandler
public <CHANNEL_PIPELINE> Router.Builder beforeIdleStateHandler(@Nonnull Class<CHANNEL_PIPELINE> pipelineClass, @Nonnull Consumer<CHANNEL_PIPELINE> consumer) - Specified by:
beforeIdleStateHandler
in interfaceRouter.Builder
-
beforeHttpRequestHandler
public <CHANNEL_PIPELINE> Router.Builder beforeHttpRequestHandler(@Nonnull Class<CHANNEL_PIPELINE> pipelineClass, @Nonnull Consumer<CHANNEL_PIPELINE> consumer) - Specified by:
beforeHttpRequestHandler
in interfaceRouter.Builder
-
addBeforeHttpServerCodec
public Router.PipelineFactory<io.netty.channel.ChannelHandler> addBeforeHttpServerCodec(@Nonnull String name, @Nonnull Supplier<? extends io.netty.channel.ChannelHandler> supplier) - Specified by:
addBeforeHttpServerCodec
in interfaceRouter.PipelineFactory<C extends io.netty.channel.Channel>
-
addBeforeChunkAggregator
public Router.PipelineFactory<io.netty.channel.ChannelHandler> addBeforeChunkAggregator(@Nonnull String name, @Nonnull Supplier<? extends io.netty.channel.ChannelHandler> supplier) - Specified by:
addBeforeChunkAggregator
in interfaceRouter.PipelineFactory<C extends io.netty.channel.Channel>
-
addBeforeIdleStateHandler
public Router.PipelineFactory<io.netty.channel.ChannelHandler> addBeforeIdleStateHandler(@Nonnull String name, @Nonnull Supplier<? extends io.netty.channel.ChannelHandler> supplier) - Specified by:
addBeforeIdleStateHandler
in interfaceRouter.PipelineFactory<C extends io.netty.channel.Channel>
-
addBeforeHttpRequestHandler
public Router.PipelineFactory<io.netty.channel.ChannelHandler> addBeforeHttpRequestHandler(@Nonnull String name, @Nonnull Supplier<? extends io.netty.channel.ChannelHandler> supplier) - Specified by:
addBeforeHttpRequestHandler
in interfaceRouter.PipelineFactory<C extends io.netty.channel.Channel>
-
builder
- Specified by:
builder
in interfaceRouter.PipelineFactory<C extends io.netty.channel.Channel>
-
factory
public <R extends ShutdownableResource,F extends ResourceRegistry.Factory<R>> F factory(@Nonnull Class<F> clazz) -
build
- Specified by:
build
in interfaceRouter.Builder
-