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 java.lang.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
Fields Modifier and Type Field Description protected io.netty.channel.ChannelInboundHandlerdecoderprotected io.netty.channel.ChannelOutboundHandlerencoderprotected ProtocolServer<A>serverprotected NettyTransporttransport
-
Constructor Summary
Constructors Constructor Description NettyChannelInitializer(ProtocolServer<A> server, NettyTransport transport, io.netty.channel.ChannelOutboundHandler encoder, io.netty.channel.ChannelInboundHandler decoder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected io.netty.handler.ssl.ApplicationProtocolConfiggetAlpnConfiguration()voidinitializeChannel(io.netty.channel.Channel ch)Initialize netty channel
-
-
-
Field Detail
-
server
protected final ProtocolServer<A extends ProtocolServerConfiguration> server
-
transport
protected final NettyTransport transport
-
encoder
protected final io.netty.channel.ChannelOutboundHandler encoder
-
decoder
protected final io.netty.channel.ChannelInboundHandler decoder
-
-
Constructor Detail
-
NettyChannelInitializer
public NettyChannelInitializer(ProtocolServer<A> server, NettyTransport transport, io.netty.channel.ChannelOutboundHandler encoder, io.netty.channel.ChannelInboundHandler decoder)
-
-
Method Detail
-
initializeChannel
public void initializeChannel(io.netty.channel.Channel ch) throws java.lang.ExceptionDescription copied from interface:NettyInitializerInitialize netty channel- Specified by:
initializeChannelin interfaceNettyInitializer- Throws:
java.lang.Exception
-
getAlpnConfiguration
protected io.netty.handler.ssl.ApplicationProtocolConfig getAlpnConfiguration()
-
-