Class EncryptedTextWebSocketHandler<T extends WebSocketClientInfo>

java.lang.Object
org.springframework.web.socket.handler.AbstractWebSocketHandler
org.springframework.web.socket.handler.TextWebSocketHandler
com.gsitm.ustra.web.socket.handlers.EncryptedTextWebSocketHandler<T>
All Implemented Interfaces:
org.springframework.web.socket.WebSocketHandler

public abstract class EncryptedTextWebSocketHandler<T extends WebSocketClientInfo> extends org.springframework.web.socket.handler.TextWebSocketHandler
텍스트 기반의 web socket 핸들러
  • Field Details

    • CONNECTION_SESSIONS

      protected static final Map<org.springframework.web.socket.WebSocketSession,WebSocketClientInfo> CONNECTION_SESSIONS
      접속 세션
    • executor

      protected Executor executor
      비동기 처리 시 사용할 executor
    • commandMessageListeners

      protected CommandMessageListener<T extends WebSocketClientInfo>[] commandMessageListeners
      Command message listeners
    • secret

      protected String secret
      암호화 키
  • Constructor Details

  • Method Details

    • createClientInfo

      protected T createClientInfo(org.springframework.web.socket.WebSocketSession session)
      websocket session에서 클라이언트 정보 생성
      Parameters:
      session - 세션
      Returns:
      WebSocketClientInfo
    • afterConnectionEstablished

      public void afterConnectionEstablished(org.springframework.web.socket.WebSocketSession session) throws Exception
      Specified by:
      afterConnectionEstablished in interface org.springframework.web.socket.WebSocketHandler
      Overrides:
      afterConnectionEstablished in class org.springframework.web.socket.handler.AbstractWebSocketHandler
      Throws:
      Exception
    • handleTextMessage

      protected void handleTextMessage(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.TextMessage message) throws Exception
      Overrides:
      handleTextMessage in class org.springframework.web.socket.handler.AbstractWebSocketHandler
      Throws:
      Exception
    • afterConnectionClosed

      public void afterConnectionClosed(org.springframework.web.socket.WebSocketSession session, org.springframework.web.socket.CloseStatus status) throws Exception
      Specified by:
      afterConnectionClosed in interface org.springframework.web.socket.WebSocketHandler
      Overrides:
      afterConnectionClosed in class org.springframework.web.socket.handler.AbstractWebSocketHandler
      Throws:
      Exception
    • sendCommandMessage

      protected void sendCommandMessage(org.springframework.web.socket.WebSocketSession session, CommandMessage message)
      메시지 전송
      Parameters:
      session - 세션
      message - 메시지