Files
IM-server-new/common/src/main/java/cn/wildfirechat/pojos/OutputCheckUserOnline.java
T

54 lines
1.6 KiB
Java
Raw Normal View History

2019-03-16 17:04:23 +08:00
/*
* This file is part of the Wildfire Chat package.
* (c) Heavyrain2012 <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
2019-05-22 07:23:09 +08:00
package cn.wildfirechat.pojos;
2019-03-16 17:04:23 +08:00
2020-03-25 10:23:47 +08:00
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
2019-03-16 17:04:23 +08:00
2020-03-25 10:23:47 +08:00
public class OutputCheckUserOnline {
public static class Session {
public String clientId;
public String userId;
public int platform;
public int status; //0 online, 1 have session offline
public long lastSeen;
2024-03-23 12:32:45 +08:00
public String packageName;
2025-10-26 16:57:33 +08:00
public String ip;
2020-03-25 10:23:47 +08:00
2024-03-23 12:32:45 +08:00
public Session() {
}
2025-10-26 16:57:33 +08:00
public Session(String clientId, String userId, int platform, int status, long lastSeen, String packageName, String ip) {
2020-03-25 10:23:47 +08:00
this.clientId = clientId;
this.userId = userId;
this.platform = platform;
this.status = status;
this.lastSeen = lastSeen;
2024-03-23 12:32:45 +08:00
this.packageName = packageName;
2025-10-26 16:57:33 +08:00
this.ip = ip;
2020-03-25 10:23:47 +08:00
}
2019-03-16 17:04:23 +08:00
}
2025-10-26 16:57:33 +08:00
public void addSession(String userId, String clientId, int platform, int status, long lastSeen, String packageName, String ip) {
Session session = new Session(clientId, userId, platform, status, lastSeen, packageName, ip);
2020-03-25 10:23:47 +08:00
sessions.add(session);
}
private List<Session> sessions = new ArrayList<>();
public List<Session> getSessions() {
return sessions;
}
public void setSessions(List<Session> sessions) {
this.sessions = sessions;
2019-03-16 17:04:23 +08:00
}
}