|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectphp.java.bridge.Session
class Session
| Field Summary | |
|---|---|
protected long |
creationTime
|
(package private) boolean |
isNew
|
protected long |
lastAccessedTime
|
protected java.util.Map |
map
|
protected java.lang.String |
name
|
protected long |
timeout
|
| Constructor Summary | |
|---|---|
Session(java.lang.String name)
|
|
| Method Summary | |
|---|---|
void |
destroy()
Causes this representation of the session to be invalidated an removed from its context. |
(package private) static void |
expire()
Check for expired sessions every 10 minutes see #CHECK_SESSION_TIMEOUT |
java.lang.Object |
get(java.lang.Object ob)
Returns the object bound to the given name in the session's context layer data. |
java.util.Map |
getAll()
Returns a map of all bindings maintained by this session. |
long |
getCreationTime()
Returns the time when this session was created, measured in milliseconds since midnight January 1, 1970 GMT. |
long |
getLastAccessedTime()
Returns the last time the client sent a request associated with this session, as the number of milliseconds since midnight January 1, 1970 GMT. |
int |
getSessionCount()
Returns the number of active sessions. |
int |
getTimeout()
Returns the maximum time interval, in seconds, that the servlet container will keep this session open between client accesses. |
void |
invalidate()
|
boolean |
isNew()
A session is considered to be "new" if it has been created by the server, but the client has not yet acknowledged joining the session. |
void |
put(java.lang.Object ob1,
java.lang.Object ob2)
Binds the specified object into the session's context layer data with the given name. |
void |
putAll(java.util.Map vars)
Copies all bindings to the session's context layer data. |
java.lang.Object |
remove(java.lang.Object ob)
Removes the object bound to the given name in the session's context layer data. |
static void |
reset()
Expires all sessions immediately. |
void |
setTimeout(int timeout)
Specifies the time, in seconds, between client requests before the servlet container will invalidate this session. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Map map
protected java.lang.String name
boolean isNew
protected long creationTime
protected long lastAccessedTime
protected long timeout
| Constructor Detail |
|---|
Session(java.lang.String name)
| Method Detail |
|---|
public java.lang.Object get(java.lang.Object ob)
ISession
get in interface ISessionob - the name of the binding to find
public void put(java.lang.Object ob1,
java.lang.Object ob2)
ISession
put in interface ISessionob1 - the name to which the data object will be bound. This
parameter cannot be null.ob2 - the data object to be bound. This parameter cannot be null.public java.lang.Object remove(java.lang.Object ob)
ISession
remove in interface ISessionob - the name of the object to remove
public void setTimeout(int timeout)
ISession
setTimeout in interface ISessiontimeout - An integer specifying the number
of secondspublic int getTimeout()
ISessionsetTimeout method. A negative time
indicates the session should never timeout.
getTimeout in interface ISessionISession.setTimeout(int)public int getSessionCount()
ISession
getSessionCount in interface ISessionpublic boolean isNew()
ISession
isNew in interface ISessionpublic void destroy()
ISession
destroy in interface ISessionpublic void invalidate()
public void putAll(java.util.Map vars)
ISession
putAll in interface ISessionvars - the map
parameter cannot be null.public java.util.Map getAll()
ISession
getAll in interface ISessionstatic void expire()
public static void reset()
public long getCreationTime()
ISession
getCreationTime in interface ISessionlong specifying
when this session was created,
expressed in
milliseconds since 1/1/1970 GMTpublic long getLastAccessedTime()
ISessionActions that your application takes, such as getting or setting a value associated with the session, do not affect the access time.
getLastAccessedTime in interface ISessionlong
representing the last time
the client sent a request associated
with this session, expressed in
milliseconds since 1/1/1970 GMT
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||