|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.w3c.jigsaw.servlet.JigsawHttpSession
public class JigsawHttpSession
| Constructor Summary | |
|---|---|
JigsawHttpSession(JigsawHttpSessionContext context,
JigsawServletContext servletContext,
javax.servlet.http.Cookie cookie)
|
|
| Method Summary | |
|---|---|
java.lang.Object |
getAttribute(java.lang.String name)
Returns the object bound with the specified name in this session, or null if no object is bound under the name. |
java.util.Enumeration |
getAttributeNames()
Returns an Enumeration of String objects
containing the names of all the objects bound to this session. |
protected javax.servlet.http.Cookie |
getCookie()
|
long |
getCreationTime()
Returns the time at which this session representation was created, in milliseconds since midnight, January 1, 1970 UTC. |
java.lang.String |
getId()
Returns the identifier assigned to this session. |
long |
getLastAccessedTime()
Returns the last time the client sent a request carrying the identifier assigned to the session. |
int |
getMaxInactiveInterval()
|
javax.servlet.ServletContext |
getServletContext()
|
javax.servlet.http.HttpSessionContext |
getSessionContext()
Deprecated. since jsdk2.1 |
java.lang.Object |
getValue(java.lang.String name)
Returns the object bound to the given name in the session's application layer data. |
java.lang.String[] |
getValueNames()
Deprecated. since jsdk2.2 |
void |
invalidate()
Causes this representation of the session to be invalidated and removed from its context. |
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. |
protected boolean |
isValid()
|
void |
putValue(java.lang.String name,
java.lang.Object value)
Binds the specified object into the session's application layer data with the given name. |
void |
removeAttribute(java.lang.String name)
Removes the object bound with the specified name from this session. |
void |
removeValue(java.lang.String name)
Removes the object bound to the given name in the session's application layer data. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Binds an object to this session, using the name specified. |
protected void |
setLastAccessedTime()
|
void |
setMaxInactiveInterval(int interval)
|
protected void |
setNoMoreNew()
|
protected void |
valueBound(javax.servlet.http.HttpSessionBindingListener value,
java.lang.String name)
|
protected void |
valueUnbound(javax.servlet.http.HttpSessionBindingListener value,
java.lang.String name)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JigsawHttpSession(JigsawHttpSessionContext context,
JigsawServletContext servletContext,
javax.servlet.http.Cookie cookie)
| Method Detail |
|---|
public java.lang.String getId()
getId in interface javax.servlet.http.HttpSessionjava.lang.IllegalStateException - if an attempt is made to access
session data after the session has been invalidatedpublic javax.servlet.http.HttpSessionContext getSessionContext()
getSessionContext in interface javax.servlet.http.HttpSessionjava.lang.IllegalStateException - if an attempt is made to access
session data after the session has been invalidatedpublic java.lang.Object getAttribute(java.lang.String name)
null if no object is bound under the name.
getAttribute in interface javax.servlet.http.HttpSessionname - a string specifying the name of the object
java.lang.IllegalStateException - if this method is called on an
invalidated sessionpublic java.util.Enumeration getAttributeNames()
Enumeration of String objects
containing the names of all the objects bound to this session.
getAttributeNames in interface javax.servlet.http.HttpSessionEnumeration of String objects
specifying the names of all the objects bound to this session
java.lang.IllegalStateException - if this method is called on an
invalidated session
public void setAttribute(java.lang.String name,
java.lang.Object value)
After this method executes, and if the object
implements HttpSessionBindingListener,
the container calls
HttpSessionBindingListener.valueBound.
setAttribute in interface javax.servlet.http.HttpSessionname - the name to which the object is bound; cannot be nullvalue - the object to be bound; cannot be null
java.lang.IllegalStateException - if this method is called on an
invalidated sessionpublic void removeAttribute(java.lang.String name)
After this method executes, and if the object
implements HttpSessionBindingListener,
the container calls
HttpSessionBindingListener.valueUnbound.
removeAttribute in interface javax.servlet.http.HttpSessionname - the name of the object to remove from this session
java.lang.IllegalStateException - if this method is called on an
invalidated sessionpublic long getCreationTime()
getCreationTime in interface javax.servlet.http.HttpSessionjava.lang.IllegalStateException - if an attempt is made to access
session data after the session has been invalidatedpublic long getLastAccessedTime()
getLastAccessedTime in interface javax.servlet.http.HttpSessionjava.lang.IllegalStateException - if an attempt is made to access
session data after the session has been invalidatedprotected void setLastAccessedTime()
public void invalidate()
invalidate in interface javax.servlet.http.HttpSessionjava.lang.IllegalStateException - if an attempt is made to access
session data after the session has been invalidatedpublic java.lang.Object getValue(java.lang.String name)
getValue in interface javax.servlet.http.HttpSessionname - - the name of the binding to find
java.lang.IllegalStateException - if an attempt is made to access
session data after the session has been invalidated
public void putValue(java.lang.String name,
java.lang.Object value)
putValue in interface javax.servlet.http.HttpSessionname - - the name to which the data object will be bound.
This parameter cannot be null.value - - the data object to be bound. This parameter cannot
be null.
java.lang.IllegalStateException - if an attempt is made to access
session data after the session has been invalidatedpublic void removeValue(java.lang.String name)
removeValue in interface javax.servlet.http.HttpSessionname - - the name of the object to remove
java.lang.IllegalStateException - if an attempt is made to access
session data after the session has been invalidated
protected void valueBound(javax.servlet.http.HttpSessionBindingListener value,
java.lang.String name)
protected void valueUnbound(javax.servlet.http.HttpSessionBindingListener value,
java.lang.String name)
public java.lang.String[] getValueNames()
getValueNames in interface javax.servlet.http.HttpSessionjava.lang.IllegalStateException - if an attempt is made to access
session data after the session has been invalidatedpublic boolean isNew()
isNew in interface javax.servlet.http.HttpSessionjava.lang.IllegalStateException - if an attempt is made to access
session data after the session has been invalidatedprotected void setNoMoreNew()
protected boolean isValid()
protected javax.servlet.http.Cookie getCookie()
public void setMaxInactiveInterval(int interval)
setMaxInactiveInterval in interface javax.servlet.http.HttpSessionpublic int getMaxInactiveInterval()
getMaxInactiveInterval in interface javax.servlet.http.HttpSessionpublic javax.servlet.ServletContext getServletContext()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||