Add SessionReader and SessionWriter worker threads for session #198
-32
@@ -85,38 +85,6 @@ public class SessionManager {
|
||||
disconnect(event.sessionId());
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a session by its ID.
|
||||
*
|
||||
* @param id the ID of the session to remove
|
||||
* @return the removed session, or null if not found
|
||||
*/
|
||||
public Session removeSession(SessionId id) {
|
||||
SessionHandle handle = sessions.remove(id);
|
||||
|
||||
if (handle == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return handle.session();
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the specified session.
|
||||
*
|
||||
* @param session the session to remove
|
||||
* @return the removed session, or null if not found
|
||||
*/
|
||||
public Session removeSession(Session session) {
|
||||
SessionHandle handle = sessions.remove(session.getId());
|
||||
|
||||
if (handle == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return handle.session();
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a session by its ID.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user