public interface EzySessionManager<S extends EzySession>
| Modifier and Type | Method and Description |
|---|---|
void |
addLoggedInSession(S session)
Recognize that the session has logged in
|
void |
clearSession(S session)
clear session
|
boolean |
containsSession(long id)
Check contains session mapped to id or not
|
int |
getAliveSessionCount() |
List<S> |
getAliveSessions()
Get all alive sessions
|
int |
getAllSessionCount() |
List<S> |
getAllSessions()
Get all sessions
|
int |
getLoggedInSessionCount() |
List<S> |
getLoggedInSessions()
Get logged in sessions
|
EzySession |
getSession(long id)
Get session by id
|
S |
getSession(Object connection)
Get session by connection
|
S |
provideSession(EzyChannel channel)
Provide session from pool and map the session to channel
|
default void |
removeSession(S session)
Add session to disconnect queue
|
void |
removeSession(S session,
com.tvd12.ezyfox.constant.EzyConstant reason)
Add session to disconnect queue
|
void addLoggedInSession(S session)
session - the sessionboolean containsSession(long id)
id - the session idEzySession getSession(long id)
id - the idvoid removeSession(S session, com.tvd12.ezyfox.constant.EzyConstant reason)
session - the sessionreason - the reasonvoid clearSession(S session)
session - the sessionList<S> getLoggedInSessions()
int getAllSessionCount()
int getAliveSessionCount()
int getLoggedInSessionCount()
S provideSession(EzyChannel channel)
channel - the channelS getSession(Object connection)
connection - the connectiondefault void removeSession(S session)
session - the sessionCopyright © 2021 Young Monkeys. All rights reserved.