Class MqttWebServerAioHandler
- java.lang.Object
-
- br.com.anteros.mqtt.core.server.http.core.MqttWebServerAioHandler
-
- All Implemented Interfaces:
org.tio.core.intf.AioHandler,org.tio.server.intf.ServerAioHandler
public class MqttWebServerAioHandler extends Object implements org.tio.server.intf.ServerAioHandler
websocket 和 http 共存- Author:
- tanyaowu, L.cm
-
-
Constructor Summary
Constructors Constructor Description MqttWebServerAioHandler(org.tio.http.common.HttpConfig httpConfig, org.tio.http.common.handler.HttpRequestHandler requestHandler, org.tio.websocket.server.handler.IWsMsgHandler wsMsgHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.tio.core.intf.Packetdecode(ByteBuffer buffer, int limit, int position, int readableLength, org.tio.core.ChannelContext context)ByteBufferencode(org.tio.core.intf.Packet packet, org.tio.core.TioConfig tioConfig, org.tio.core.ChannelContext channelContext)voidhandler(org.tio.core.intf.Packet packet, org.tio.core.ChannelContext channelContext)org.tio.http.common.HttpResponseupdateWebSocketProtocol(org.tio.http.common.HttpRequest request)本方法改编自baseio: https://gitee.com/generallycloud/baseio
感谢开源作者的付出
-
-
-
Method Detail
-
decode
public org.tio.core.intf.Packet decode(ByteBuffer buffer, int limit, int position, int readableLength, org.tio.core.ChannelContext context) throws org.tio.core.exception.TioDecodeException
- Specified by:
decodein interfaceorg.tio.core.intf.AioHandler- Throws:
org.tio.core.exception.TioDecodeException
-
encode
public ByteBuffer encode(org.tio.core.intf.Packet packet, org.tio.core.TioConfig tioConfig, org.tio.core.ChannelContext channelContext)
- Specified by:
encodein interfaceorg.tio.core.intf.AioHandler
-
handler
public void handler(org.tio.core.intf.Packet packet, org.tio.core.ChannelContext channelContext) throws Exception- Specified by:
handlerin interfaceorg.tio.core.intf.AioHandler- Throws:
Exception
-
updateWebSocketProtocol
public org.tio.http.common.HttpResponse updateWebSocketProtocol(org.tio.http.common.HttpRequest request) throws org.tio.core.exception.TioDecodeException本方法改编自baseio: https://gitee.com/generallycloud/baseio
感谢开源作者的付出- Parameters:
request- HttpRequest- Returns:
- HttpResponse
- Throws:
org.tio.core.exception.TioDecodeException- TioDecodeException
-
-