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