Class MqttServerInitializer
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
com.bytedesk.core.socket.mqtt.initializer.MqttServerInitializer
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
public class MqttServerInitializer
extends io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
- Author:
- bytedesk.com on 2019-07-05
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
private final ProtocolProcess
private final io.netty.handler.ssl.SslContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
initChannel
(io.netty.channel.socket.SocketChannel socketChannel) TODO: ChannelInitializer中应该使用 NioSocketChannel or SocketChannel ?Methods inherited from class io.netty.channel.ChannelInitializer
channelRegistered, exceptionCaught, handlerAdded, handlerRemoved
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggered
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, isSharable
-
Field Details
-
mSslCtx
private final io.netty.handler.ssl.SslContext mSslCtx -
mProtocolProcess
-
mMaxPayloadSize
private final int mMaxPayloadSize
-
-
Constructor Details
-
MqttServerInitializer
public MqttServerInitializer()
-
-
Method Details
-
initChannel
TODO: ChannelInitializer中应该使用 NioSocketChannel or SocketChannel ?优缺点?- Specified by:
initChannel
in classio.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
- Parameters:
socketChannel
- channel- Throws:
Exception
- expt
-