org.eclipse.higgins.rp
Interface SessionContext


public interface SessionContext

An interface by which protocol handlers can get access to the session context This is the abstraction of the httpSession and portions of the servletContext in J2EE containers Note: All the store/retrieve methods have two versions. One version is a Global attribute store and retrieve while the other stores and retrieves attribute/values in a specific context


Method Summary
 boolean attributeExists(String attribute)
          Check if there is a value attached to a given attribute.
 boolean attributeExists(String authSession, String attribute)
          Check if there is a value attached to a given attribute in the indicated authentication session.
 void deleteAttribute(String attribute)
          Deletes the value associated with an attribute if it exists.
 void deleteAttribute(String authSession, String attribute)
          Deletes the value associated with an attribute if it exists.
 String getCurrentRequestUrl()
           
 String getProtectedResource()
           
 String getRealPath(String path)
           
 Object retrieveAttribute(String attribute)
          Retrieves attribute associated with a given name
 Object retrieveAttribute(String authSession, String attribute)
          Retrieves attribute associated with a given name in the given authentication session
 String setProtectedResource(String rsrc)
           
 int storeAttribute(String attribute, Object value)
          Associates a value with a key in the session store.
 int storeAttribute(String authSession, String attribute, Object value)
          Associates a value with a key in the session store of a particular authentication session.
 

Method Detail

storeAttribute

public int storeAttribute(String attribute,
                          Object value)
Associates a value with a key in the session store.

Parameters:
attribute - String to specify name
value - associated to this attribute
Returns:
0 on success.

retrieveAttribute

public Object retrieveAttribute(String attribute)
Retrieves attribute associated with a given name

Parameters:
attribute - key for retrieval.
Returns:

attributeExists

public boolean attributeExists(String attribute)
Check if there is a value attached to a given attribute.

Parameters:
attribute - key to check for
Returns:
true if there is a value attached to this key

deleteAttribute

public void deleteAttribute(String attribute)
Deletes the value associated with an attribute if it exists.

Parameters:
attribute -

storeAttribute

public int storeAttribute(String authSession,
                          String attribute,
                          Object value)
Associates a value with a key in the session store of a particular authentication session.

Parameters:
authSession - name of the authentication session
attribute - String to specify name
value - associated to this attribute
Returns:
0 on success.

retrieveAttribute

public Object retrieveAttribute(String authSession,
                                String attribute)
Retrieves attribute associated with a given name in the given authentication session

Parameters:
authSession - name of the authentication session
attribute - key for retrieval.
Returns:

attributeExists

public boolean attributeExists(String authSession,
                               String attribute)
Check if there is a value attached to a given attribute in the indicated authentication session.

Parameters:
authSession - name of the authentication session
attribute - key to check for
Returns:
true if there is a value attached to this key

deleteAttribute

public void deleteAttribute(String authSession,
                            String attribute)
Deletes the value associated with an attribute if it exists.

Parameters:
authSession - name of the authentication session
attribute -

getProtectedResource

public String getProtectedResource()
Returns:
This returns the URI of the resource which triggered the authentication process.

setProtectedResource

public String setProtectedResource(String rsrc)
Parameters:
rsrc - the protected resource which triggered this authentication request

getCurrentRequestUrl

public String getCurrentRequestUrl()
Returns:
This returns the URI of the current request. This may be different from the URI which triggered the authentication

getRealPath

public String getRealPath(String path)
Parameters:
path - is the virtual path
Returns:
Returns a String containing the real path for a given virtual path.