程序包 cn.wzpmc.network

类 PacketHandler

  • 所有已实现的接口:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

    public class PacketHandler
    extends io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.websocketx.TextWebSocketFrame>
    websocket包处理器
    从以下版本开始:
    2024/7/31 上午12:14
    • 嵌套类概要

      • 从接口继承的嵌套类/接口 io.netty.channel.ChannelHandler

        io.netty.channel.ChannelHandler.Sharable
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      protected void channelRead0​(io.netty.channel.ChannelHandlerContext channelHandlerContext, io.netty.handler.codec.http.websocketx.TextWebSocketFrame webSocketFrame)  
      <REQUEST,​RESPONSE>
      void
      registerResponse​(java.util.UUID echo, java.util.concurrent.CompletableFuture<ActionResponse<RESPONSE>> responsePromise, Action<REQUEST,​RESPONSE> request)
      注册返回回调
      • 从类继承的方法 io.netty.channel.SimpleChannelInboundHandler

        acceptInboundMessage, channelRead
      • 从类继承的方法 io.netty.channel.ChannelInboundHandlerAdapter

        channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
      • 从类继承的方法 io.netty.channel.ChannelHandlerAdapter

        ensureNotSharable, handlerAdded, handlerRemoved, isSharable
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • 从接口继承的方法 io.netty.channel.ChannelHandler

        handlerAdded, handlerRemoved
    • 构造器详细资料

      • PacketHandler

        public PacketHandler()
    • 方法详细资料

      • channelRead0

        protected void channelRead0​(io.netty.channel.ChannelHandlerContext channelHandlerContext,
                                    io.netty.handler.codec.http.websocketx.TextWebSocketFrame webSocketFrame)
        指定者:
        channelRead0 在类中 io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.websocketx.TextWebSocketFrame>
      • registerResponse

        public <REQUEST,​RESPONSE> void registerResponse​(java.util.UUID echo,
                                                              java.util.concurrent.CompletableFuture<ActionResponse<RESPONSE>> responsePromise,
                                                              Action<REQUEST,​RESPONSE> request)
        注册返回回调
        类型参数:
        REQUEST - 请求体类型
        RESPONSE - 返回类型
        参数:
        echo - 回调ID
        responsePromise - 返回Promise
        request - 请求体
        从以下版本开始:
        2024/8/23 21:48 v0.0.5-dev