public class AllbsWebSocketHandler
extends org.springframework.web.socket.handler.TextWebSocketHandler
| 构造器和说明 |
|---|
AllbsWebSocketHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
afterConnectionClosed(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.CloseStatus status)
OnClose 事件
|
void |
afterConnectionEstablished(org.springframework.web.socket.WebSocketSession session)
OnOpen
|
void |
handleTextMessage(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.TextMessage textMessage)
OnMessage 事件
|
void |
handleTransportError(org.springframework.web.socket.WebSocketSession session,
Throwable exception)
对应 OnError 事件
|
public void afterConnectionEstablished(org.springframework.web.socket.WebSocketSession session)
throws MessageHandlerException
afterConnectionEstablished 在接口中 org.springframework.web.socket.WebSocketHandlerafterConnectionEstablished 在类中 org.springframework.web.socket.handler.AbstractWebSocketHandlersession - 会话MessageHandlerException - 消息处理器未注册异常public void handleTextMessage(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.TextMessage textMessage)
handleTextMessage 在类中 org.springframework.web.socket.handler.AbstractWebSocketHandlersession - 会话textMessage - 消息public void afterConnectionClosed(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.CloseStatus status)
throws Exception
afterConnectionClosed 在接口中 org.springframework.web.socket.WebSocketHandlerafterConnectionClosed 在类中 org.springframework.web.socket.handler.AbstractWebSocketHandlersession - status - Exceptionpublic void handleTransportError(org.springframework.web.socket.WebSocketSession session,
Throwable exception)
throws Exception
handleTransportError 在接口中 org.springframework.web.socket.WebSocketHandlerhandleTransportError 在类中 org.springframework.web.socket.handler.AbstractWebSocketHandlersession - exception - ExceptionCopyright © 2021. All rights reserved.