Class NettyChannelInitializer<A extends ProtocolServerConfiguration>
java.lang.Object
org.infinispan.server.core.transport.NettyChannelInitializer<A>
- All Implemented Interfaces:
NettyInitializer
- Direct Known Subclasses:
RestChannelInitializer
public class NettyChannelInitializer<A extends ProtocolServerConfiguration>
extends Object
implements NettyInitializer
Pipeline factory for Netty-based channels. For each pipeline created, a new decoder is created which means that each
incoming connection deals with a unique decoder instance. Since the encoder does not maintain any state, a single
encoder instance is shared by all incoming connections, if and only if, the protocol mandates an encoder.
- Since:
- 4.1
- Author:
- Galder Zamarreño, Sebastian Łaskawiec
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Supplier
<io.netty.channel.ChannelInboundHandler> protected final io.netty.channel.ChannelOutboundHandler
protected final io.netty.util.Mapping
<? super String, ? extends io.netty.handler.ssl.SslContext> protected final ProtocolServer
<A> protected final NettyTransport
-
Constructor Summary
ModifierConstructorDescriptionNettyChannelInitializer
(ProtocolServer<A> server, NettyTransport transport, io.netty.channel.ChannelOutboundHandler encoder, Supplier<io.netty.channel.ChannelInboundHandler> decoderSupplier) protected
NettyChannelInitializer
(ProtocolServer<A> server, NettyTransport transport, io.netty.channel.ChannelOutboundHandler encoder, Supplier<io.netty.channel.ChannelInboundHandler> decoderSupplier, io.netty.handler.ssl.ApplicationProtocolConfig alpnConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionvoid
initializeChannel
(io.netty.channel.Channel ch) Initialize netty channelprotected io.netty.util.Mapping
<? super String, ? extends io.netty.handler.ssl.SslContext> initMapping
(io.netty.handler.ssl.ApplicationProtocolConfig alpnConfiguration)
-
Field Details
-
server
-
transport
-
encoder
protected final io.netty.channel.ChannelOutboundHandler encoder -
decoderSupplier
-
mapping
protected final io.netty.util.Mapping<? super String,? extends io.netty.handler.ssl.SslContext> mapping
-
-
Constructor Details
-
NettyChannelInitializer
public NettyChannelInitializer(ProtocolServer<A> server, NettyTransport transport, io.netty.channel.ChannelOutboundHandler encoder, Supplier<io.netty.channel.ChannelInboundHandler> decoderSupplier) -
NettyChannelInitializer
protected NettyChannelInitializer(ProtocolServer<A> server, NettyTransport transport, io.netty.channel.ChannelOutboundHandler encoder, Supplier<io.netty.channel.ChannelInboundHandler> decoderSupplier, io.netty.handler.ssl.ApplicationProtocolConfig alpnConfiguration)
-
-
Method Details
-
initMapping
protected io.netty.util.Mapping<? super String,? extends io.netty.handler.ssl.SslContext> initMapping(io.netty.handler.ssl.ApplicationProtocolConfig alpnConfiguration) -
initializeChannel
Description copied from interface:NettyInitializer
Initialize netty channel- Specified by:
initializeChannel
in interfaceNettyInitializer
- Parameters:
ch
-- Throws:
Exception
-