public class MessageHandler extends Object
| 构造器和说明 |
|---|
MessageHandler(SSLSocket socket,
SocketFactory socketFactory,
List<Tunnel> tunnels) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getClientId() |
Map<String,Tunnel> |
getMappingMap() |
SSLSocket |
getSocket() |
SocketFactory |
getSocketFactory() |
List<Tunnel> |
getTunnels() |
boolean |
onMessage(com.alibaba.fastjson.JSONObject json)
处理服务器返回的消息
|
void |
sendAuth()
发送认证授权
|
void |
sendMessage(String str) |
void |
sendPing() |
void |
sendPong() |
void |
sendRegProxy() |
void |
sendReqTunnel() |
void |
setClientId(String clientId) |
void |
setMappingMap(Map<String,Tunnel> mappingMap) |
void |
setSocket(SSLSocket socket) |
void |
setSocketFactory(SocketFactory socketFactory) |
void |
setTunnels(List<Tunnel> tunnels) |
public MessageHandler(SSLSocket socket, SocketFactory socketFactory, List<Tunnel> tunnels)
public boolean onMessage(com.alibaba.fastjson.JSONObject json)
throws Exception
json - Exceptionpublic void sendAuth()
public void sendReqTunnel()
public void sendPong()
public void sendPing()
public void sendRegProxy()
public void sendMessage(String str)
public SSLSocket getSocket()
public void setSocket(SSLSocket socket)
public SocketFactory getSocketFactory()
public void setSocketFactory(SocketFactory socketFactory)
public String getClientId()
public void setClientId(String clientId)
Copyright © 2017. All rights reserved.