public final class TcpDeviceSessionManager extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static TcpDeviceSession |
createDeviceSession(String productId,
String deviceName,
io.netty.channel.Channel channel)
创建设备连接Session
|
static TcpDeviceSession |
getDeviceSession(String productId,
String deviceName)
获取设备连接Session
|
static void |
handleConnectionLost(TcpDeviceSession deviceSession)
连接断开情况处理
|
static void |
putDeviceSession(TcpDeviceSession deviceSession)
放入设备连接Session
|
public static TcpDeviceSession createDeviceSession(String productId, String deviceName, io.netty.channel.Channel channel)
productId - 产品IDdeviceName - 设备名称channel - 连接channelpublic static void putDeviceSession(TcpDeviceSession deviceSession)
deviceSession - 设备连接Sessionpublic static TcpDeviceSession getDeviceSession(String productId, String deviceName)
productId - 产品IDdeviceName - 设备名称public static void handleConnectionLost(TcpDeviceSession deviceSession)
Copyright © 2020. All rights reserved.