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(WebSocketSession session,
BinaryMessage message) |
void |
handleDirectMessage(String senderInfo,
byte[] txtMessage) |
void |
handleDirectMessage(String senderInfo,
WebSocketMessage<?> message) |
protected void |
handleTextMessage(WebSocketSession session,
TextMessage message) |
void |
sendMsgToAllSessions(String senderInfo,
WebSocketMessage<?> message) |
afterConnectionClosed, afterConnectionEstablished, afterPropertiesSet, destroy, handleTransportError, registerDirectSender, sendMsgToAllDirectSenders, setDirectSenderOnStartup, supportsPartialMessages, unregisterDirectSender
handleMessage, handlePongMessage
protected void handleTextMessage(WebSocketSession session, TextMessage message) throws Exception
handleTextMessage
in class AbstractWebSocketHandler
Exception
protected void handleBinaryMessage(WebSocketSession session, BinaryMessage message) throws Exception
handleBinaryMessage
in class AbstractWebSocketHandler
Exception
public void sendMsgToAllSessions(String senderInfo, WebSocketMessage<?> message)
public void handleDirectMessage(String senderInfo, WebSocketMessage<?> message) throws Exception
handleDirectMessage
in class GlueAbstractWebSocketHandler
Exception
public void handleDirectMessage(String senderInfo, byte[] txtMessage) throws Exception
handleDirectMessage
in class GlueAbstractWebSocketHandler
Exception
Copyright © 2013–2021 POSCO ICT. All rights reserved.