All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface Acme.Serve.servlet.http.HttpSession

public interface HttpSession
An association of HTTP interactions.

This is taken from JavaSoft's Servlet API documentation.

Fetch the software.
Fetch the entire Acme package.


Method Index

 o getCreationTime()
Returns the time at which this session representation was created.
 o getId()
Returns the identifier assigned to this session.
 o getLastAccessedTime()
Returns the last time the client sent a request carrying the identifier assigned to the session.
 o getSessionContext()
Returns the context in which this session is bound.
 o getValue(String)
Returns the object bound to the given name in the session's application layer data.
 o invalidate()
Causes this representation of the session to be invalidated and removed from its context.
 o 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.
 o putValue(String, Object)
Binds the specified object into the session's application layer data with the given name.
 o removeValue(String)
Removes the object bound to the given name in the session's application layer data.

Methods

 o getId
 public abstract String getId()
Returns the identifier assigned to this session. An HttpSession's identifier is a unique string that is created and maintained by HttpSessionContext.

 o getSessionContext
 public abstract HttpSessionContext getSessionContext()
Returns the context in which this session is bound.

 o getCreationTime
 public abstract long getCreationTime()
Returns the time at which this session representation was created.

 o getLastAccessedTime
 public abstract long getLastAccessedTime()
Returns the last time the client sent a request carrying the identifier assigned to the session. Application level operations, such as getting or setting a value associated with the session, does not affect the access time.

This information is particularly useful in session management policies. For example, a session manager could leave all sessions which have not been used in a long time in a given context. The sessions can be sorted according to age to optimize some task.

 o invalidate
 public abstract void invalidate()
Causes this representation of the session to be invalidated and removed from its context.

Throws: IllegalStateException
if an attempt is made to access session data after the session has been invalidated
 o putValue
 public abstract void putValue(String name,
                               Object value)
Binds the specified object into the session's application layer data with the given name. Any existing binding with the same name is replaced. New (or existing) values that implement the HttpSessionBindingListener interface will call its valueBound() method.

 o getValue
 public abstract Object getValue(String name)
Returns the object bound to the given name in the session's application layer data. Returns null if there is no such binding.

 o removeValue
 public abstract void removeValue(String name)
Removes the object bound to the given name in the session's application layer data. Does nothing if there is no object bound to the given name. The value that implements the HttpSessionBindingListener interface will call its valueUnbound() method.

 o isNew
 public abstract 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. For example, if the server supported only cookie-based sessions and the client had completely disabled the use of cookies, then calls to HttpServletRequest.getSession() would always return "new" sessions.


All Packages  Class Hierarchy  This Package  Previous  Next  Index

ACME Java  ACME Labs