|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.androidpn.server.xmpp.session.SessionManager
public class SessionManager
This class manages the sessions connected to the server.
Method Summary | |
---|---|
void |
addSession(ClientSession session)
Adds a new session that has been authenticated. |
void |
closeAllSessions()
Closes the all sessions. |
ClientSession |
createClientSession(Connection conn)
Creates a new ClientSession and returns it. |
static SessionManager |
getInstance()
Returns the singleton instance of SessionManager. |
ClientSession |
getSession(org.xmpp.packet.JID from)
Returns the session associated with the JID. |
ClientSession |
getSession(java.lang.String username)
Returns the session associated with the username. |
java.util.Collection<ClientSession> |
getSessions()
Returns a list that contains all authenticated client sessions. |
boolean |
removeSession(ClientSession session)
Removes a client session. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static SessionManager getInstance()
public ClientSession createClientSession(Connection conn)
conn
- the connection
public void addSession(ClientSession session)
session
- the sessionpublic ClientSession getSession(java.lang.String username)
username
- the username of the client address
public ClientSession getSession(org.xmpp.packet.JID from)
from
- the client address
public java.util.Collection<ClientSession> getSessions()
public boolean removeSession(ClientSession session)
session
- the session to be removed
public void closeAllSessions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |