Test webapp

adriani.webapp.beans
Class SessionBean

java.lang.Object
  extended by adriani.webapp.beans.GeneralBean
      extended by adriani.webapp.beans.SessionBean
All Implemented Interfaces:
java.io.Serializable

public class SessionBean
extends GeneralBean

Bean managing the HTTP session for each user. This bean is created before the user login, hence it exists for each user, even if he's not logged in the webapp.
This bean takes care of whatever concerns the session, hence the user's data must be managed by another bean (for example a UsersBean class).

See Also:
Serialized Form

Constructor Summary
SessionBean()
          Mandatory EMPTY constructor, required by the JavaBeans implementation rules.
 
Method Summary
 void countPages(int pages)
          Count the pages visited by the user in this session.
 HttpServletRequest getHttpRequest()
          JavaBean property
 HttpServletResponse getHttpResponse()
          JavaBean property
 HttpSession getHttpSession()
          JavaBean property
 java.lang.String getName()
          Return the value bound to the name property.
 int getPages()
          Return the number of pages visited by the user in this session.
 java.lang.String getSessionIP()
          Returns the IP address at the moment of login.
 boolean isRegistered()
          Tells if this user has already logged-in.
 void logSessionIP()
          Store a reference to the current session IP into this bean.
 void setHttpRequest(HttpServletRequest httpRequest)
          JavaBean property
 void setHttpResponse(HttpServletResponse httpResponse)
          JavaBean property
 void setHttpSession(HttpSession httpSession)
          JavaBean property
 void setName(java.lang.String value)
          Set a general string value bound to the name property.
 void setPages(int value)
          Set the number of pages visited by the user in this session.
 void setRegistered(boolean value)
          Specifies if this user has already logged-in.
 void setSessionIP(java.lang.String address)
          Set the IP address at the moment of login.
 
Methods inherited from class adriani.webapp.beans.GeneralBean
finalize, isSet, toByte
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionBean

public SessionBean()
Mandatory EMPTY constructor, required by the JavaBeans implementation rules.

Method Detail

logSessionIP

public void logSessionIP()
Store a reference to the current session IP into this bean.


setName

public void setName(java.lang.String value)
Set a general string value bound to the name property.


getName

public java.lang.String getName()
Return the value bound to the name property.


setRegistered

public void setRegistered(boolean value)
Specifies if this user has already logged-in.


isRegistered

public boolean isRegistered()
Tells if this user has already logged-in.


setSessionIP

public void setSessionIP(java.lang.String address)
Set the IP address at the moment of login.


getSessionIP

public java.lang.String getSessionIP()
Returns the IP address at the moment of login.


setPages

public void setPages(int value)
Set the number of pages visited by the user in this session.


getPages

public int getPages()
Return the number of pages visited by the user in this session.


setHttpSession

public void setHttpSession(HttpSession httpSession)
JavaBean property


getHttpSession

public HttpSession getHttpSession()
JavaBean property


setHttpRequest

public void setHttpRequest(HttpServletRequest httpRequest)
JavaBean property


getHttpRequest

public HttpServletRequest getHttpRequest()
JavaBean property


setHttpResponse

public void setHttpResponse(HttpServletResponse httpResponse)
JavaBean property


getHttpResponse

public HttpServletResponse getHttpResponse()
JavaBean property


countPages

public void countPages(int pages)
Count the pages visited by the user in this session.


Build 21/09/2009

Morpheus Quality Technologies - making the Zion software
Copyright © 2009 Stefano Adriani. All Rights Reserved