SK.gnome.dwarf.http
Interface Session

All Superinterfaces:
javax.servlet.http.HttpSession

public interface Session
extends javax.servlet.http.HttpSession

This class extends the javax.servlet.http.HttpSession.


Method Summary
 java.lang.String getRemoteAddr()
          Returns IP address of the remote client.
 javax.security.auth.Subject getSubject()
          Returns subject associated with the session.
 boolean isValid()
          Checks whether the session is valid.
 void touch()
          Updates the session.
 
Methods inherited from interface javax.servlet.http.HttpSession
getAttribute, getAttributeNames, getCreationTime, getId, getLastAccessedTime, getMaxInactiveInterval, getSessionContext, getValue, getValueNames, invalidate, isNew, putValue, removeAttribute, removeValue, setAttribute, setMaxInactiveInterval
 

Method Detail

isValid

public boolean isValid()
Checks whether the session is valid.

Returns:
true if the session is valid

getSubject

public javax.security.auth.Subject getSubject()
Returns subject associated with the session.

The subject associated with the session represents an identity of the user, who is currently joining the session.

Returns:
the subject
Throws:
java.lang.IllegalStateException - if session is not valid

getRemoteAddr

public java.lang.String getRemoteAddr()
Returns IP address of the remote client.

This method must return an IP address of the remote client which initiated the session creation. The address is used for the client authentication to prevent the session-stealing attacks.

Returns:
the string IP address, such as 127.0.0.1

touch

public void touch()
Updates the session.

This method updates the session's last accessed time to the current time.

Throws:
java.lang.IllegalStateException - if session is not valid


Copyright (c) 1999-2005, Gnome Ltd. All rights reserved.