程序包 cool.scx.ext.ws

类 WSWebSocketHandler

java.lang.Object
cool.scx.ext.ws.WSWebSocketHandler
所有已实现的接口:
cool.scx.mvc.base.BaseWebSocketHandler

public class WSWebSocketHandler extends Object implements cool.scx.mvc.base.BaseWebSocketHandler
事件总线 websocket 连接处理类

负责维护前台和后台的事件总线通讯

版本:
1.0.16
作者:
scx567888
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    static final String
    心跳检测字符
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    onClose(io.vertx.core.http.ServerWebSocket webSocket, cool.scx.mvc.websocket.OnCloseRoutingContext ctx)
    void
    onError(Throwable event, io.vertx.core.http.ServerWebSocket webSocket, cool.scx.mvc.websocket.OnExceptionRoutingContext ctx)
    连接错误 打印错误 同时移除 连接
    void
    onOpen(io.vertx.core.http.ServerWebSocket webSocket, cool.scx.mvc.websocket.OnOpenRoutingContext ctx)
    void
    onTextMessage(String textData, io.vertx.core.http.WebSocketFrame h, io.vertx.core.http.ServerWebSocket webSocket, cool.scx.mvc.websocket.OnFrameRoutingContext ctx)

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    从接口继承的方法 cool.scx.mvc.base.BaseWebSocketHandler

    onBinaryMessage
  • 字段详细资料

  • 构造器详细资料

    • WSWebSocketHandler

      public WSWebSocketHandler()
  • 方法详细资料

    • onOpen

      public void onOpen(io.vertx.core.http.ServerWebSocket webSocket, cool.scx.mvc.websocket.OnOpenRoutingContext ctx)

      onOpen

      指定者:
      onOpen 在接口中 cool.scx.mvc.base.BaseWebSocketHandler
    • onClose

      public void onClose(io.vertx.core.http.ServerWebSocket webSocket, cool.scx.mvc.websocket.OnCloseRoutingContext ctx)

      onClose

      指定者:
      onClose 在接口中 cool.scx.mvc.base.BaseWebSocketHandler
    • onTextMessage

      public void onTextMessage(String textData, io.vertx.core.http.WebSocketFrame h, io.vertx.core.http.ServerWebSocket webSocket, cool.scx.mvc.websocket.OnFrameRoutingContext ctx) throws com.fasterxml.jackson.core.JsonProcessingException
      指定者:
      onTextMessage 在接口中 cool.scx.mvc.base.BaseWebSocketHandler
      抛出:
      com.fasterxml.jackson.core.JsonProcessingException
    • onError

      public void onError(Throwable event, io.vertx.core.http.ServerWebSocket webSocket, cool.scx.mvc.websocket.OnExceptionRoutingContext ctx)
      连接错误 打印错误 同时移除 连接
      指定者:
      onError 在接口中 cool.scx.mvc.base.BaseWebSocketHandler