Home » apache-tomcat-6.0.26-src » org.apache » catalina » [javadoc | source]
org.apache.catalina
public interface: Session [javadoc | source]

All Known Implementing Classes:
    DeltaSession, StandardSession, ReplicatedSession, DeltaSession, ReplicatedSession, MockSession, ClusterSession, ClusterSession

A Session is the Catalina-internal facade for an HttpSession that is used to maintain state information between requests for a particular user of a web application.
Field Summary
public static final  String SESSION_CREATED_EVENT    The SessionEvent event type when a session is created. 
public static final  String SESSION_DESTROYED_EVENT    The SessionEvent event type when a session is destroyed. 
public static final  String SESSION_ACTIVATED_EVENT    The SessionEvent event type when a session is activated. 
public static final  String SESSION_PASSIVATED_EVENT    The SessionEvent event type when a session is passivated. 
Method from org.apache.catalina.Session Summary:
access,   addSessionListener,   endAccess,   expire,   getAuthType,   getCreationTime,   getId,   getIdInternal,   getInfo,   getLastAccessedTime,   getLastAccessedTimeInternal,   getManager,   getMaxInactiveInterval,   getNote,   getNoteNames,   getPrincipal,   getSession,   isValid,   recycle,   removeNote,   removeSessionListener,   setAuthType,   setCreationTime,   setId,   setManager,   setMaxInactiveInterval,   setNew,   setNote,   setPrincipal,   setValid
Method from org.apache.catalina.Session Detail:
 public  void access()
    Update the accessed time information for this session. This method should be called by the context when a request comes in for a particular session, even if the application does not reference it.
 public  void addSessionListener(SessionListener listener)
    Add a session event listener to this component.
 public  void endAccess()
    End access to the session.
 public  void expire()
    Perform the internal processing required to invalidate this session, without triggering an exception if the session has already expired.
 public String getAuthType()
    Return the authentication type used to authenticate our cached Principal, if any.
 public long getCreationTime()
    Return the creation time for this session.
 public String getId()
    Return the session identifier for this session.
 public String getIdInternal()
    Return the session identifier for this session.
 public String getInfo()
    Return descriptive information about this Session implementation and the corresponding version number, in the format <description>/<version>.
 public long getLastAccessedTime()
    Return the last time the client sent a request associated with this session, as the number of milliseconds since midnight, January 1, 1970 GMT. Actions that your application takes, such as getting or setting a value associated with the session, do not affect the access time.
 public long getLastAccessedTimeInternal()
    Return the last client access time without invalidation check
 public Manager getManager()
    Return the Manager within which this Session is valid.
 public int getMaxInactiveInterval()
    Return the maximum time interval, in seconds, between client requests before the servlet container will invalidate the session. A negative time indicates that the session should never time out.
 public Object getNote(String name)
    Return the object bound with the specified name to the internal notes for this session, or null if no such binding exists.
 public Iterator getNoteNames()
    Return an Iterator containing the String names of all notes bindings that exist for this session.
 public Principal getPrincipal()
    Return the authenticated Principal that is associated with this Session. This provides an Authenticator with a means to cache a previously authenticated Principal, and avoid potentially expensive Realm.authenticate() calls on every request. If there is no current associated Principal, return null.
 public HttpSession getSession()
    Return the HttpSession for which this object is the facade.
 public boolean isValid()
    Return the isValid flag for this session.
 public  void recycle()
    Release all object references, and initialize instance variables, in preparation for reuse of this object.
 public  void removeNote(String name)
    Remove any object bound to the specified name in the internal notes for this session.
 public  void removeSessionListener(SessionListener listener)
    Remove a session event listener from this component.
 public  void setAuthType(String authType)
    Set the authentication type used to authenticate our cached Principal, if any.
 public  void setCreationTime(long time)
    Set the creation time for this session. This method is called by the Manager when an existing Session instance is reused.
 public  void setId(String id)
    Set the session identifier for this session.
 public  void setManager(Manager manager)
    Set the Manager within which this Session is valid.
 public  void setMaxInactiveInterval(int interval)
    Set the maximum time interval, in seconds, between client requests before the servlet container will invalidate the session. A negative time indicates that the session should never time out.
 public  void setNew(boolean isNew)
    Set the isNew flag for this session.
 public  void setNote(String name,
    Object value)
    Bind an object to a specified name in the internal notes associated with this session, replacing any existing binding for this name.
 public  void setPrincipal(Principal principal)
    Set the authenticated Principal that is associated with this Session. This provides an Authenticator with a means to cache a previously authenticated Principal, and avoid potentially expensive Realm.authenticate() calls on every request.
 public  void setValid(boolean isValid)
    Set the isValid flag for this session.