|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectphp.java.servlet.HttpSessionFacade
public class HttpSessionFacade
Wraps the J2EE session interface
Method Summary | |
---|---|
void |
destroy()
Causes this representation of the session to be invalidated an removed from its context. |
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. |
javax.servlet.http.HttpServletRequest |
getHttpServletRequest()
Deprecated. Use Context.getHttpServletRequest() |
javax.servlet.http.HttpServletResponse |
getHttpServletResponse()
Deprecated. Use Context.getHttpServletResponse() |
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. |
javax.servlet.ServletContext |
getServletContext()
Deprecated. Use Context.getServletContext() |
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. |
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. |
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 |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public javax.servlet.http.HttpServletRequest getHttpServletRequest()
Context.getHttpServletRequest()
public javax.servlet.ServletContext getServletContext()
Context.getServletContext()
public javax.servlet.http.HttpServletResponse getHttpServletResponse()
Context.getHttpServletResponse()
public java.lang.Object get(java.lang.Object ob)
ISession
get
in interface ISession
ob
- the name of the binding to find
public void put(java.lang.Object ob1, java.lang.Object ob2)
ISession
put
in interface ISession
ob1
- 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 ISession
ob
- the name of the object to removepublic void setTimeout(int timeout)
ISession
setTimeout
in interface ISession
timeout
- An integer specifying the number
of secondspublic int getTimeout()
ISession
setTimeout
method. A negative time
indicates the session should never timeout.
getTimeout
in interface ISession
ISession.setTimeout(int)
public int getSessionCount()
ISession
getSessionCount
in interface ISession
public boolean isNew()
ISession
isNew
in interface ISession
public void destroy()
ISession
destroy
in interface ISession
public void putAll(java.util.Map vars)
ISession
putAll
in interface ISession
vars
- the map
parameter cannot be null.public java.util.Map getAll()
ISession
getAll
in interface ISession
public long getCreationTime()
ISession
getCreationTime
in interface ISession
long
specifying
when this session was created,
expressed in
milliseconds since 1/1/1970 GMTpublic long getLastAccessedTime()
ISession
Actions that your application takes, such as getting or setting a value associated with the session, do not affect the access time.
getLastAccessedTime
in interface ISession
long
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 |