|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.tomcat.facade.HttpSessionFacade
Facade for http session. Used to prevent servlets to access internal tomcat objects. This is a "special" facade - since session management is (more or less) orthogonal to request processing, it is indpendent of tomcat architecture. It will provide a HttpSession implementation ( but it's not guaranteed in any way it is "safe" ), and HttpSessionFacade will act as a "guard" to make sure only servlet API public methods are exposed. Another thing to note is that this object will be recycled and will allways be set in a request. The "real" session object will determine if the request is part of a session.
| Method Summary | |
java.lang.Object |
getAttribute(java.lang.String name)
|
java.util.Enumeration |
getAttributeNames()
Return an Enumeration of String objects
containing the names of the objects bound to this session. |
long |
getCreationTime()
Return the time when this session was created, in milliseconds since midnight, January 1, 1970 GMT. |
java.lang.String |
getId()
|
long |
getLastAccessedTime()
|
int |
getMaxInactiveInterval()
|
javax.servlet.http.HttpSessionContext |
getSessionContext()
Deprecated. |
java.lang.Object |
getValue(java.lang.String name)
Deprecated. |
java.lang.String[] |
getValueNames()
Deprecated. |
void |
invalidate()
Invalidates this session and unbinds any objects bound to it. |
boolean |
isNew()
Return true if the client does not yet know about the
session, or if the client chooses not to join the session. |
void |
putValue(java.lang.String name,
java.lang.Object value)
Deprecated. |
void |
removeAttribute(java.lang.String name)
Remove the object bound with the specified name from this session. |
void |
removeValue(java.lang.String name)
Deprecated. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
|
void |
setMaxInactiveInterval(int interval)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public java.lang.String getId()
getId in interface javax.servlet.http.HttpSessionpublic long getCreationTime()
getCreationTime in interface javax.servlet.http.HttpSessionjava.lang.IllegalStateException - if this method is called on an
invalidated sessionpublic javax.servlet.http.HttpSessionContext getSessionContext()
getSessionContext in interface javax.servlet.http.HttpSessionpublic long getLastAccessedTime()
getLastAccessedTime in interface javax.servlet.http.HttpSessionpublic void invalidate()
invalidate in interface javax.servlet.http.HttpSessionjava.lang.IllegalStateException - if this method is called on
an invalidated sessionpublic boolean isNew()
true if the client does not yet know about the
session, or if the client chooses not to join the session. For
example, if the server used only cookie-based sessions, and the client
has disabled the use of cookies, then a session would be new on each
request.
isNew in interface javax.servlet.http.HttpSessionjava.lang.IllegalStateException - if this method is called on an
invalidated session
public void putValue(java.lang.String name,
java.lang.Object value)
putValue in interface javax.servlet.http.HttpSession
public void setAttribute(java.lang.String name,
java.lang.Object value)
setAttribute in interface javax.servlet.http.HttpSessionpublic java.lang.Object getValue(java.lang.String name)
getValue in interface javax.servlet.http.HttpSessionpublic java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface javax.servlet.http.HttpSessionpublic java.lang.String[] getValueNames()
getValueNames in interface javax.servlet.http.HttpSessionpublic java.util.Enumeration getAttributeNames()
Enumeration of String objects
containing the names of the objects bound to this session.
getAttributeNames in interface javax.servlet.http.HttpSessionjava.lang.IllegalStateException - if this method is called on an
invalidated sessionpublic void removeValue(java.lang.String name)
removeValue in interface javax.servlet.http.HttpSessionpublic void removeAttribute(java.lang.String name)
After this method executes, and if the object implements
HttpSessionBindingListener, the container calls
valueUnbound() on the object.
removeAttribute in interface javax.servlet.http.HttpSessionname - Name of the object to remove from this session.
java.lang.IllegalStateException - if this method is called on an
invalidated sessionpublic void setMaxInactiveInterval(int interval)
setMaxInactiveInterval in interface javax.servlet.http.HttpSessionpublic int getMaxInactiveInterval()
getMaxInactiveInterval in interface javax.servlet.http.HttpSession
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||