类 CustomWebSocketHandler
java.lang.Object
org.springframework.web.socket.handler.AbstractWebSocketHandler
org.springframework.web.socket.handler.TextWebSocketHandler
com.sie.mbm.mom.framework.websocket.handler.CustomWebSocketHandler
- 所有已实现的接口:
org.springframework.web.socket.WebSocketHandler
public class CustomWebSocketHandler
extends org.springframework.web.socket.handler.TextWebSocketHandler
-
字段概要
字段修饰符和类型字段说明private static final com.fasterxml.jackson.databind.ObjectMapperprivate PlanTextMessageHandlerprivate WebSocketLifeCycleListener业务自定义websocktet事件监听器 -
构造器概要
构造器构造器说明CustomWebSocketHandler(PlanTextMessageHandler planTextMessageHandler, WebSocketLifeCycleListener webSocketLifeCycles) -
方法概要
修饰符和类型方法说明voidafterConnectionClosed(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.CloseStatus closeStatus) 连接关闭事件voidafterConnectionEstablished(org.springframework.web.socket.WebSocketSession session) 连接建立成功事件voidhandleTextMessage(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.TextMessage message) 从类继承的方法 org.springframework.web.socket.handler.TextWebSocketHandler
handleBinaryMessage从类继承的方法 org.springframework.web.socket.handler.AbstractWebSocketHandler
handleMessage, handlePongMessage, handleTransportError, supportsPartialMessages
-
字段详细资料
-
MAPPER
private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER -
planTextMessageHandler
-
webSocketLifeCycles
业务自定义websocktet事件监听器
-
-
构造器详细资料
-
CustomWebSocketHandler
public CustomWebSocketHandler() -
CustomWebSocketHandler
public CustomWebSocketHandler(PlanTextMessageHandler planTextMessageHandler, WebSocketLifeCycleListener webSocketLifeCycles)
-
-
方法详细资料
-
handleTextMessage
public void handleTextMessage(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.TextMessage message) throws com.fasterxml.jackson.core.JsonProcessingException - 覆盖:
handleTextMessage在类中org.springframework.web.socket.handler.AbstractWebSocketHandler- 抛出:
com.fasterxml.jackson.core.JsonProcessingException
-
afterConnectionEstablished
public void afterConnectionEstablished(org.springframework.web.socket.WebSocketSession session) throws Exception 连接建立成功事件- 指定者:
afterConnectionEstablished在接口中org.springframework.web.socket.WebSocketHandler- 覆盖:
afterConnectionEstablished在类中org.springframework.web.socket.handler.AbstractWebSocketHandler- 抛出:
Exception
-
afterConnectionClosed
public void afterConnectionClosed(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.CloseStatus closeStatus) throws Exception 连接关闭事件- 指定者:
afterConnectionClosed在接口中org.springframework.web.socket.WebSocketHandler- 覆盖:
afterConnectionClosed在类中org.springframework.web.socket.handler.AbstractWebSocketHandler- 抛出:
Exception
-