public class GlueSimpleWebSocketHandler extends GlueAbstractWebSocketHandler
GlueAbstractWebSocketHandler 를 상속하여 Text 또는 binary message를 처리할 수 있는 기본 handler.
WebSocket으로 연결된 client 들 중에서 session이 alive 되어 있는 모든 client에게 전달받은 message를 재전송 한다.
Direct Message도 동일하게 재전송한다.
See Also : GlueAbstractWebSocketHandler
Constructor and Description |
---|
GlueSimpleWebSocketHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
handleBinaryMessage(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.BinaryMessage message) |
void |
handleDirectMessage(String senderInfo,
byte[] txtMessage) |
void |
handleDirectMessage(String senderInfo,
org.springframework.web.socket.WebSocketMessage<?> message) |
protected void |
handleTextMessage(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.TextMessage message) |
void |
sendMsgToAllSessions(String senderInfo,
org.springframework.web.socket.WebSocketMessage<?> message) |
afterConnectionClosed, afterConnectionEstablished, afterPropertiesSet, destroy, handleTransportError, registerDirectSender, sendMsgToAllDirectSenders, setDirectSenderOnStartup, supportsPartialMessages, unregisterDirectSender
protected void handleTextMessage(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.TextMessage message) throws Exception
handleTextMessage
in class org.springframework.web.socket.handler.AbstractWebSocketHandler
Exception
protected void handleBinaryMessage(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.BinaryMessage message) throws Exception
handleBinaryMessage
in class org.springframework.web.socket.handler.AbstractWebSocketHandler
Exception
public void sendMsgToAllSessions(String senderInfo, org.springframework.web.socket.WebSocketMessage<?> message)
public void handleDirectMessage(String senderInfo, org.springframework.web.socket.WebSocketMessage<?> message) throws Exception
handleDirectMessage
in class GlueAbstractWebSocketHandler
Exception
public void handleDirectMessage(String senderInfo, byte[] txtMessage) throws Exception
handleDirectMessage
in class GlueAbstractWebSocketHandler
Exception
Copyright © 2023–2024 POSCO DX. All rights reserved.