Class GlueSimpleWebSocketHandler
java.lang.Object
org.springframework.web.socket.handler.AbstractWebSocketHandler
com.poscoict.glueframework.websocket.GlueAbstractWebSocketHandler
com.poscoict.glueframework.websocket.GlueSimpleWebSocketHandler
- All Implemented Interfaces:
DisposableBean
,InitializingBean
,WebSocketHandler
GlueAbstractWebSocketHandler 를 상속하여 Text 또는 binary message를 처리할 수 있는 기본 handler.
WebSocket으로 연결된 client 들 중에서 session이 alive 되어 있는 모든 client에게 전달받은 message를 재전송 한다.
Direct Message도 동일하게 재전송한다.
See Also : GlueAbstractWebSocketHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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) Methods inherited from class com.poscoict.glueframework.websocket.GlueAbstractWebSocketHandler
afterConnectionClosed, afterConnectionEstablished, afterPropertiesSet, destroy, handleTransportError, registerDirectSender, sendMsgToAllDirectSenders, setDirectSenderOnStartup, supportsPartialMessages, unregisterDirectSender
Methods inherited from class org.springframework.web.socket.handler.AbstractWebSocketHandler
handleMessage, handlePongMessage
-
Constructor Details
-
GlueSimpleWebSocketHandler
public GlueSimpleWebSocketHandler()
-
-
Method Details
-
handleTextMessage
- Overrides:
handleTextMessage
in classAbstractWebSocketHandler
- Throws:
Exception
-
handleBinaryMessage
protected void handleBinaryMessage(WebSocketSession session, BinaryMessage message) throws Exception - Overrides:
handleBinaryMessage
in classAbstractWebSocketHandler
- Throws:
Exception
-
sendMsgToAllSessions
-
handleDirectMessage
- Overrides:
handleDirectMessage
in classGlueAbstractWebSocketHandler
- Throws:
Exception
-
handleDirectMessage
- Overrides:
handleDirectMessage
in classGlueAbstractWebSocketHandler
- Throws:
Exception
-