Class ConnectionEntity
java.lang.Object
com.bytedesk.core.base.BaseEntity
com.bytedesk.core.socket.connection.ConnectionEntity
- All Implemented Interfaces:
Serializable
Connection entity for tracking user/agent live connections across devices and protocols.
Supports multi-client online status by recording each client connection session.
Database Table: bytedesk_core_connection
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String渠道:如 WEB_VISITOR / WEB / APP 等(与系统 channel 对齐)private String客户端唯一标识(如 MQTT clientId、WS sessionId 等)private Long首次连接毫秒时间戳private String设备 UID(可选,来自 clientId 或 SDK)private Long断开连接毫秒时间戳private String客户端 IPprivate Long最近心跳/活跃毫秒时间戳private String协议:MQTT / WS / SSE / OTHERprivate static final longprivate String连接状态:CONNECTED / DISCONNECTEDprivate Integer心跳存活 TTL(秒),用于判定是否在线(lastHeartbeatAt 未过期)private StringUser-Agent(可选,长度较长) -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.bytedesk.core.base.BaseEntity
getCreatedAtString, getUpdatedAtString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
clientId
客户端唯一标识(如 MQTT clientId、WS sessionId 等) -
deviceUid
设备 UID(可选,来自 clientId 或 SDK) -
protocol
协议:MQTT / WS / SSE / OTHER -
channel
渠道:如 WEB_VISITOR / WEB / APP 等(与系统 channel 对齐) -
ip
客户端 IP -
userAgent
User-Agent(可选,长度较长) -
status
连接状态:CONNECTED / DISCONNECTED -
connectedAt
首次连接毫秒时间戳 -
lastHeartbeatAt
最近心跳/活跃毫秒时间戳 -
disconnectedAt
断开连接毫秒时间戳 -
ttlSeconds
心跳存活 TTL(秒),用于判定是否在线(lastHeartbeatAt 未过期)
-
-
Constructor Details
-
ConnectionEntity
public ConnectionEntity()
-