org.talika.tarsis.command
Interface Session

All Known Implementing Classes:
SessionImpl

public interface Session

Interface that defines a user session in Tarsis MVC Framework.

Session object provides a way to identify a user across more than one request and to store information about that user.Session is intended to decouple Tarsis commands layer from Servlet layer.

Version:
$Revision: 106 $
Author:
Jose M. Palomar

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.lang.String getId()
          Returns a string containing the unique identifier assigned to this session.
 void removeAttribute(java.lang.String name)
          Removes the object bound with the specified name from this session.
 void setAttribute(java.lang.String name, java.lang.Object value)
          Binds an object to this session, using the name specified.
 

Method Detail

getId

java.lang.String getId()
Returns a string containing the unique identifier assigned to this session.

Returns:
String string containing the unique identifier assigned to this session.

setAttribute

void setAttribute(java.lang.String name,
                  java.lang.Object value)
Binds an object to this session, using the name specified. If an object of the same name is already bound to the session, the object is replaced.

Parameters:
name - String the name to which the object is bound; cannot be null.
value - Object the object to be bound.
See Also:
HttpSession.setAttribute(String, Object)

getAttribute

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.

Parameters:
name - String a string specifying the name of the object.
Returns:
Object the object with the specified name.
See Also:
HttpSession.getAttribute(String)

removeAttribute

void removeAttribute(java.lang.String name)
Removes the object bound with the specified name from this session. If the session does not have an object bound with the specified name, this method does nothing.

Parameters:
name - String the name of the object to remove from this session.
See Also:
HttpSession.removeAttribute(String)


Copyright © 2002-2012 Talika Open Source Group. All Rights Reserved.