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
Constructors -
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.BuilderaddBootstrapFilter(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()connectionCountRecorder(Consumer<Integer> connectionCountConsumer) connectionHandleMode(ConnectionHandleMode connectionHandleMode) connectionLimit(int connectionLimit) Allow 0 limit to reject all connections as well as testing.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) rejectedConnectionCountRecorder(Consumer<Integer> rejectedConnectionCountRecorderr) 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, waitMethods inherited from interface com.linkedin.alpini.router.impl.Router.Builder
timeoutProcessor
-
Constructor Details
-
Router4
-
-
Method Details
-
nettyVersion
- Specified by:
nettyVersionin interfaceRouter.Builder
-
name
- Specified by:
namein interfaceRouter.Builder
-
resourceRegistry
- Specified by:
resourceRegistryin interfaceRouter.Builder
-
threadFactory
- Specified by:
threadFactoryin interfaceRouter.Builder
-
serverSocketChannel
- Specified by:
serverSocketChannelin interfaceRouter.Builder
-
bossPoolSize
- Specified by:
bossPoolSizein interfaceRouter.Builder
-
ioWorkerPoolSize
- Specified by:
ioWorkerPoolSizein interfaceRouter.Builder
-
ioWorkerPoolBuilder
public <POOL_TYPE> Router.Builder ioWorkerPoolBuilder(@Nonnull Class<POOL_TYPE> poolClass, @Nonnull Function<Executor, POOL_TYPE> builder) - Specified by:
ioWorkerPoolBuilderin interfaceRouter.Builder
-
bossPoolBuilder
public <POOL_TYPE> Router.Builder bossPoolBuilder(@Nonnull Class<POOL_TYPE> poolClass, @Nonnull Function<Executor, POOL_TYPE> builder) - Specified by:
bossPoolBuilderin interfaceRouter.Builder
-
executor
- Specified by:
executorin interfaceRouter.Builder
-
workerExecutor
- Specified by:
workerExecutorin interfaceRouter.Builder
-
appWorkerCorePoolSize
- Specified by:
appWorkerCorePoolSizein interfaceRouter.Builder
-
appWorkerChannelMaxMemorySize
- Specified by:
appWorkerChannelMaxMemorySizein interfaceRouter.Builder
-
appWorkerTotalMaxMemorySize
- Specified by:
appWorkerTotalMaxMemorySizein interfaceRouter.Builder
-
appWorkerKeepAliveSeconds
- Specified by:
appWorkerKeepAliveSecondsin interfaceRouter.Builder
-
timeoutProcessor
- Specified by:
timeoutProcessorin interfaceRouter.Builder
-
connectionLimit
Allow 0 limit to reject all connections as well as testing.- Specified by:
connectionLimitin interfaceRouter.Builder
-
connectionLimit
- Specified by:
connectionLimitin interfaceRouter.Builder
-
connectionCountRecorder
- Specified by:
connectionCountRecorderin interfaceRouter.Builder
-
rejectedConnectionCountRecorder
public Router.Builder rejectedConnectionCountRecorder(@Nonnull Consumer<Integer> rejectedConnectionCountRecorderr) - Specified by:
rejectedConnectionCountRecorderin interfaceRouter.Builder
-
connectionHandleMode
- Specified by:
connectionHandleModein interfaceRouter.Builder
-
serverSocketOptions
- Specified by:
serverSocketOptionsin interfaceRouter.Builder
-
serverSocketOptions
- Specified by:
serverSocketOptionsin interfaceRouter.Builder
-
maxHeaderSize
- Specified by:
maxHeaderSizein interfaceRouter.Builder
-
maxInitialLineLength
- Specified by:
maxInitialLineLengthin interfaceRouter.Builder
-
maxChunkSize
- Specified by:
maxChunkSizein interfaceRouter.Builder
-
maxContentLength
- Specified by:
maxContentLengthin interfaceRouter.Builder
-
idleTimeout
- Specified by:
idleTimeoutin interfaceRouter.Builder
-
handshakeTimeout
- Specified by:
handshakeTimeoutin interfaceRouter.Builder
-
enableInboundHttp2
- Specified by:
enableInboundHttp2in interfaceRouter.Builder
-
useCustomMultiplexHandler
- Specified by:
useCustomMultiplexHandlerin interfaceRouter.Builder
-
http2MaxConcurrentStreams
- Specified by:
http2MaxConcurrentStreamsin interfaceRouter.Builder
-
http2MaxFrameSize
- Specified by:
http2MaxFrameSizein interfaceRouter.Builder
-
http2InitialWindowSize
- Specified by:
http2InitialWindowSizein interfaceRouter.Builder
-
http2HeaderTableSize
- Specified by:
http2HeaderTableSizein interfaceRouter.Builder
-
http2MaxHeaderListSize
- Specified by:
http2MaxHeaderListSizein interfaceRouter.Builder
-
addBootstrapFilter
- Specified by:
addBootstrapFilterin interfaceRouter.Builder
-
pipelineFactory
public <CHANNEL_HANDLER> Router.PipelineFactory<CHANNEL_HANDLER> pipelineFactory(@Nonnull Class<CHANNEL_HANDLER> handlerClass) - Specified by:
pipelineFactoryin interfaceRouter.Builder
-
beforeHttpServerCodec
public <CHANNEL_PIPELINE> Router.Builder beforeHttpServerCodec(@Nonnull Class<CHANNEL_PIPELINE> pipelineClass, @Nonnull Consumer<CHANNEL_PIPELINE> consumer) - Specified by:
beforeHttpServerCodecin interfaceRouter.Builder
-
beforeChunkAggregator
public <CHANNEL_PIPELINE> Router.Builder beforeChunkAggregator(@Nonnull Class<CHANNEL_PIPELINE> pipelineClass, @Nonnull Consumer<CHANNEL_PIPELINE> consumer) - Specified by:
beforeChunkAggregatorin interfaceRouter.Builder
-
beforeIdleStateHandler
public <CHANNEL_PIPELINE> Router.Builder beforeIdleStateHandler(@Nonnull Class<CHANNEL_PIPELINE> pipelineClass, @Nonnull Consumer<CHANNEL_PIPELINE> consumer) - Specified by:
beforeIdleStateHandlerin interfaceRouter.Builder
-
beforeHttpRequestHandler
public <CHANNEL_PIPELINE> Router.Builder beforeHttpRequestHandler(@Nonnull Class<CHANNEL_PIPELINE> pipelineClass, @Nonnull Consumer<CHANNEL_PIPELINE> consumer) - Specified by:
beforeHttpRequestHandlerin interfaceRouter.Builder
-
addBeforeHttpServerCodec
public Router.PipelineFactory<io.netty.channel.ChannelHandler> addBeforeHttpServerCodec(@Nonnull String name, @Nonnull Supplier<? extends io.netty.channel.ChannelHandler> supplier) - Specified by:
addBeforeHttpServerCodecin 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:
addBeforeChunkAggregatorin 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:
addBeforeIdleStateHandlerin 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:
addBeforeHttpRequestHandlerin interfaceRouter.PipelineFactory<C extends io.netty.channel.Channel>
-
builder
- Specified by:
builderin 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:
buildin interfaceRouter.Builder
-