org.talika.tarsis.command
Class SessionImpl

java.lang.Object
  extended by org.talika.tarsis.command.SessionImpl
All Implemented Interfaces:
Session

public final class SessionImpl
extends java.lang.Object
implements Session

Implementation of Session interface.

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

Constructor Summary
SessionImpl(javax.servlet.http.HttpSession httpSession)
          Constructs a new SessionImpl object.
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionImpl

public SessionImpl(javax.servlet.http.HttpSession httpSession)
Constructs a new SessionImpl object.

Parameters:
httpSession - HttpSession source HttpSession.
Method Detail

getId

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

Specified by:
getId in interface Session
Returns:
String string containing the unique identifier assigned to this session.
See Also:
Session.getId()

setAttribute

public 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.

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

getAttribute

public 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.

Specified by:
getAttribute in interface Session
Parameters:
name - String a string specifying the name of the object.
Returns:
Object the object with the specified name.
See Also:
Session.getAttribute(String)

removeAttribute

public 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.

Specified by:
removeAttribute in interface Session
Parameters:
name - String the name of the object to remove from this session.
See Also:
Session.removeAttribute(String)


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