@@ -0,0 +1,1469 @@
+package com.lance.websocket.config;%0A%0Aimport java.io.Serializable;%0Aimport java.util.Date;%0A%0Aimport org.apache.commons.lang3.time.DateUtils;%0Aimport org.springframework.web.socket.WebSocketSession;%0A%0Apublic class SocketSessionInfo implements Serializable%7B%0A%09private static final long serialVersionUID = 5120020441590774164L;%0A%09/**%E7%AE%A1%E7%90%86WebSession%E5%A4%B1%E6%95%88%E6%97%B6%E9%97%B43%E5%88%86%E9%92%9F*/%0A%09public static final int SESSION_INVALID = 3;%0A%09%0A%09private String sessionId;%0A%09%0A%09private WebSocketSession webSocketSession;%0A%09%0A%09private Date lastSessionTime;%0A%09%0A%09private Date endSessionTime;%0A%0A%09public String getSessionId() %7B%0A%09%09return sessionId;%0A%09%7D%0A%0A%09public void setSessionId(String sessionId) %7B%0A%09%09this.sessionId = sessionId;%0A%09%7D%0A%0A%09public WebSocketSession getWebSocketSession() %7B%0A%09%09return webSocketSession;%0A%09%7D%0A%0A%09public void setWebSocketSession(WebSocketSession webSocketSession) %7B%0A%09%09this.webSocketSession = webSocketSession;%0A%09%7D%0A%0A%09public Date getLastSessionTime() %7B%0A%09%09return lastSessionTime;%0A%09%7D%0A%0A%09public void setLastSessionTime(Date lastSessionTime) %7B%0A%09%09this.lastSessionTime = lastSessionTime;%0A%09%7D%0A%0A%09public Date getEndSessionTime() %7B%0A%09%09if(this.lastSessionTime != null)%7B%0A%09%09%09endSessionTime = DateUtils.addMinutes(lastSessionTime, SESSION_INVALID);%0A%09%09%7D%0A%09%09return endSessionTime;%0A%09%7D%0A%0A%09public void setEndSessionTime(Date endSessionTime) %7B%0A%09%09this.endSessionTime = endSessionTime;%0A%09%7D%0A%09%0A%09@Override%0A%09public boolean equals(Object obj) %7B%0A%09%09SocketSessionInfo info = (SocketSessionInfo)obj;%0A%09%09return this.sessionId.equals(info.getSessionId());%0A%09%7D%0A%7D

add socketsession javabean