public abstract class BaseProxyHandler extends BaseHandler
| Constructor and Description |
|---|
BaseProxyHandler(NodeUrl nodeUrl) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterConnectionEstablishedImpl(org.springframework.web.socket.WebSocketSession session)
建立会话后
|
void |
destroy(org.springframework.web.socket.WebSocketSession session)
关闭连接
|
protected abstract Object[] |
getParameters(Map<String,Object> attributes)
连接参数
|
protected String |
handleTextMessage(Map<String,Object> attributes,
ProxySession proxySession,
com.alibaba.fastjson.JSONObject json,
ConsoleCommandOp consoleCommandOp)
消息处理方法
|
protected String |
handleTextMessage(Map<String,Object> attributes,
org.springframework.web.socket.WebSocketSession session,
com.alibaba.fastjson.JSONObject json,
ConsoleCommandOp consoleCommandOp)
消息处理方法
|
protected void |
handleTextMessage(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.TextMessage message) |
protected void |
init(org.springframework.web.socket.WebSocketSession session,
Map<String,Object> attributes)
连接成功 初始化
|
afterConnectionClosed, afterConnectionEstablished, handleTransportError, logOpt, sendMsg, showHelloMsghandleBinaryMessagepublic BaseProxyHandler(NodeUrl nodeUrl)
protected abstract Object[] getParameters(Map<String,Object> attributes)
attributes - 属性public void afterConnectionEstablishedImpl(org.springframework.web.socket.WebSocketSession session)
throws Exception
BaseHandlerafterConnectionEstablishedImpl in class BaseHandlersession - 会话Exception - 异常protected void init(org.springframework.web.socket.WebSocketSession session,
Map<String,Object> attributes)
throws Exception
session - 会话attributes - 属性URISyntaxException - 异常IOException - IOExceptionprotected void handleTextMessage(org.springframework.web.socket.WebSocketSession session,
org.springframework.web.socket.TextMessage message)
throws Exception
handleTextMessage in class org.springframework.web.socket.handler.AbstractWebSocketHandlerExceptionprotected String handleTextMessage(Map<String,Object> attributes, org.springframework.web.socket.WebSocketSession session, com.alibaba.fastjson.JSONObject json, ConsoleCommandOp consoleCommandOp) throws IOException
attributes - 属性session - 当前回话json - 数据consoleCommandOp - 操作类型IOExceptionprotected String handleTextMessage(Map<String,Object> attributes, ProxySession proxySession, com.alibaba.fastjson.JSONObject json, ConsoleCommandOp consoleCommandOp)
attributes - 属性proxySession - 代理回话json - 数据consoleCommandOp - 操作类型public void destroy(org.springframework.web.socket.WebSocketSession session)
BaseHandlerdestroy in class BaseHandlersession - sessionCopyright © 2017–2022. All rights reserved.