|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--apollo.Session.WebSession
This data will be persistant based on the users Session ID. It's also provides methods for inserting the SessionID in POST and GET actions.
Field Summary | |
protected boolean |
expired
|
protected java.util.Hashtable |
sessionData
|
protected java.lang.String |
strServletPath
|
Constructor Summary | |
WebSession(java.lang.String username,
java.lang.String newSessionID,
int i)
This creates a new Session. |
Method Summary | |
void |
copy(WebSession otherSession)
Copies the contents of a different session into this one |
java.util.Enumeration |
elements()
This returns an enumeration of the elements stored in the primary session database. |
java.lang.String |
encodeURL(java.lang.String URL)
Encodes the supplied URL with the SessionID. |
java.util.Date |
getCreationDate()
Returns the Date at which this session was created |
java.lang.String |
getHidden()
This will return a HIDDEN field with the session ID embedded in it. |
java.lang.String |
getServletPath()
Gets the servlet path for this session |
int |
getTimeBetweenTransactions()
|
int |
getTimeout()
Returns the current setting for the maximum amount of seconds which may elapse before the session expires itself. |
int |
getTransactions()
Returns the number of transactions which have occoured on this object |
java.lang.Object |
getValue(java.lang.String name)
Gets a value from the session database. |
boolean |
hasValue(java.lang.String name)
Returns true if the session contains that key |
void |
incTransactions()
If you have set a Timeout value for your session, you must call either this method or setCurrentTime(). |
boolean |
isExpired()
This checks to see if the session is expired. |
boolean |
isNullSession()
Returns if this session is a special null session |
java.util.Enumeration |
keys()
This returns an enumeration of the keys stored in the primary session database. |
void |
put(java.lang.String name,
java.lang.Object value)
Sets a value in the session database. |
void |
remove(java.lang.String name)
Removes a key from the session database. |
void |
setCurrentTime()
If you have set a Timeout value for your session, you must call either this method or incTransactions(). |
void |
setExpired(boolean ex)
This sets this session's status to expired. |
void |
setIsNullSession(boolean isNullSession)
|
void |
setServletPath(java.lang.String strServletPath)
Stores the servlet path for this session |
void |
setTimeout(int i)
This sets the maximum amount of seconds which may elapse before the session expires itself. |
void |
setValue(java.lang.String name,
java.lang.Object value)
Sets a value in the session database. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Hashtable sessionData
protected boolean expired
protected java.lang.String strServletPath
Constructor Detail |
public WebSession(java.lang.String username, java.lang.String newSessionID, int i)
Username
- the Username of the owner of this sessionsessionID
- the session ID this session should usetimeout
- how many seconds between transactions before this session expires. 0 = neverMethod Detail |
public java.lang.String getServletPath()
public void setServletPath(java.lang.String strServletPath)
public void copy(WebSession otherSession)
public java.util.Date getCreationDate()
public boolean isNullSession()
public void setIsNullSession(boolean isNullSession)
public int getTimeout()
public void setTimeout(int i)
public int getTransactions()
public void setCurrentTime()
incTransactions()
public void incTransactions()
setCurrentTime()
public java.util.Enumeration keys()
public java.util.Enumeration elements()
public void setExpired(boolean ex)
expired
public boolean isExpired()
setExpired(boolean)
public int getTimeBetweenTransactions()
public void setValue(java.lang.String name, java.lang.Object value)
name
- The key/name to be usedvalue
- the value of the objectgetValue(java.lang.String)
,
remove(java.lang.String)
,
keys()
public void put(java.lang.String name, java.lang.Object value)
name
- The key/name to be usedvalue
- the value of the objectgetValue(java.lang.String)
,
remove(java.lang.String)
,
keys()
public java.lang.Object getValue(java.lang.String name)
name
- The key/name to be used for loookupsetValue(java.lang.String, java.lang.Object)
,
remove(java.lang.String)
,
keys()
public boolean hasValue(java.lang.String name)
name
- The key/name to be used for loookupsetValue(java.lang.String, java.lang.Object)
,
remove(java.lang.String)
,
keys()
public void remove(java.lang.String name)
name
- The key/name to be usedgetValue(java.lang.String)
,
setValue(java.lang.String, java.lang.Object)
,
keys()
public java.lang.String getHidden()
encodeURL(java.lang.String)
public java.lang.String encodeURL(java.lang.String URL)
URL
- The URL to be encoded#printHidden
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |