|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--amwebarsentitlementservice.session.SessionTable
The SessionTable contains all the Sessions of the AMWebARSEntitlementService. It generates all Sessions and manages the access to them. The SessionTable is a Singleton. There is only one instance in the system.
Field Summary | |
static boolean |
BOUND_NUMBER_OF_SESSIONS
|
static int |
MAX_NUMBER_OF_SESSIONS
|
Constructor Summary | |
protected |
SessionTable()
|
Method Summary | |
void |
cleanSessionTable(java.util.Date current_date)
Removes all sessions from the SessionTable, whose validity time is expired or not reached at current_date. |
void |
cleanSessionTable(long current_date)
|
void |
clear()
Removes all elements of the SessionTable. |
protected java.lang.Object |
clone()
It isn't permited to clone the object: The clone method throws the CloneNotSupportedException. |
boolean |
containsSession(Session session)
Tests whether a session is contained in the SessionTable. |
boolean |
containsSessionID(java.lang.String session_id)
Tests whether a Session with given session_id is contained in the SessionTable. |
boolean |
equals(java.lang.Object other_object)
Tests whether this SessionTable is equal to another. |
static SessionTable |
getInstance()
Returns the only instance of the SessionTable. |
Session |
getSession(java.lang.String session_id)
Returns a session of a given session_id. |
boolean |
isEmpty()
Tests whether this Table contains no Sessions. |
java.util.Enumeration |
keys()
Returns all keys of the SessionTable. |
Session |
registerSession(java.lang.String session_id)
Registers a new Session in the SessionTable. |
Session |
removeSession(Session session)
Removes a Session from the SessionTable. |
Session |
removeSession(java.lang.String session_id)
Removes a Session with given session_id from the SessionTable. |
void |
returnSession(Session session)
Returns this session to the SessionPool. |
int |
size()
Returns the size of the table that means the number of session stored in it. |
java.lang.String |
toString()
|
org.jdom.Document |
toXML()
Translates the SessionTable to XML. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final boolean BOUND_NUMBER_OF_SESSIONS
public static final int MAX_NUMBER_OF_SESSIONS
Constructor Detail |
protected SessionTable()
Method Detail |
public static SessionTable getInstance()
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- public Session getSession(java.lang.String session_id) throws java.util.NoSuchElementException
session_id
- String ID of the sessionjava.util.NoSuchElementException
- If the session isn't found.NullPointerException
- if parameter is nullpublic Session registerSession(java.lang.String session_id)
session_id
- String ID of the Session that is registered.NullPointerException
- if parameter is nullpublic Session removeSession(java.lang.String session_id) throws java.util.NoSuchElementException
String
- session_id of the Session to be removedjava.util.NoSuchElementException
- if the Session isn't foundNullPointerException
- if parameter is nullpublic Session removeSession(Session session) throws java.util.NoSuchElementException
session
- Session to be removedjava.util.NoSuchElementException
- if the Session isn't foundNullPointerException
- if parameter is nullpublic void returnSession(Session session)
public boolean containsSession(Session session)
session
- Session to be looked for.NullPointerException
- if parameter is nullpublic boolean containsSessionID(java.lang.String session_id)
session_id
- String ID of the Session to be looked for.NullPointerException
- if parameter is nullpublic int size()
public boolean isEmpty()
public void clear()
public java.util.Enumeration keys()
public void cleanSessionTable(java.util.Date current_date)
current_date
- current dateNullPointerException
- if parameter is nullpublic void cleanSessionTable(long current_date)
public boolean equals(java.lang.Object other_object)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public org.jdom.Document toXML()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |