org.sr.server.http
Class HttpClientSession

java.lang.Object
  extended by org.sr.server.http.HttpClientSession
All Implemented Interfaces:
IClientSessionInfo<javax.servlet.http.HttpSession>

public class HttpClientSession
extends java.lang.Object
implements IClientSessionInfo<javax.servlet.http.HttpSession>

Wrapper class of HttpSession

Author:
Serhat Dirik

Constructor Summary
HttpClientSession(javax.servlet.http.HttpSession session)
           
 
Method Summary
 java.lang.Object getAttribute(java.lang.String arg0)
          Gives the attribute value that saved in the session previously
 java.util.Enumeration<java.lang.String> getAttributeNames()
          Gives all attributes that are saved within the session
 java.lang.String getId()
          Unique session identifier
 javax.servlet.http.HttpSession getWrappedSession()
          Gives the protocol specific session object
 java.lang.Class<javax.servlet.http.HttpSession> getWrappedType()
          gives the wrapped session object type
 void invalidate()
          Invalidates the client session
 void removeAttribute(java.lang.String arg0)
          Removes an attribute from the session
 void setAttribute(java.lang.String arg0, java.lang.Object arg1)
          Saves an attribute in client session
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpClientSession

public HttpClientSession(javax.servlet.http.HttpSession session)
Method Detail

getAttribute

public java.lang.Object getAttribute(java.lang.String arg0)
Description copied from interface: IClientSessionInfo
Gives the attribute value that saved in the session previously

Specified by:
getAttribute in interface IClientSessionInfo<javax.servlet.http.HttpSession>
Parameters:
arg0 - name of the attribute
Returns:
null if there is no attribute saved previously

getAttributeNames

public java.util.Enumeration<java.lang.String> getAttributeNames()
Description copied from interface: IClientSessionInfo
Gives all attributes that are saved within the session

Specified by:
getAttributeNames in interface IClientSessionInfo<javax.servlet.http.HttpSession>
Returns:
saved attributes in the session

getId

public java.lang.String getId()
Description copied from interface: IClientSessionInfo
Unique session identifier

Specified by:
getId in interface IClientSessionInfo<javax.servlet.http.HttpSession>
Returns:
session UUID

invalidate

public void invalidate()
Description copied from interface: IClientSessionInfo
Invalidates the client session

Specified by:
invalidate in interface IClientSessionInfo<javax.servlet.http.HttpSession>

removeAttribute

public void removeAttribute(java.lang.String arg0)
Description copied from interface: IClientSessionInfo
Removes an attribute from the session

Specified by:
removeAttribute in interface IClientSessionInfo<javax.servlet.http.HttpSession>
Parameters:
arg0 - name of the attribute

setAttribute

public void setAttribute(java.lang.String arg0,
                         java.lang.Object arg1)
Description copied from interface: IClientSessionInfo
Saves an attribute in client session

Specified by:
setAttribute in interface IClientSessionInfo<javax.servlet.http.HttpSession>
Parameters:
arg0 - name of the attribute
arg1 - value of the attribute. In order to support session serialization, save only serializable objects

getWrappedSession

public javax.servlet.http.HttpSession getWrappedSession()
Description copied from interface: IClientSessionInfo
Gives the protocol specific session object

Specified by:
getWrappedSession in interface IClientSessionInfo<javax.servlet.http.HttpSession>
Returns:
protocol specific session

getWrappedType

public java.lang.Class<javax.servlet.http.HttpSession> getWrappedType()
Description copied from interface: IClientSessionInfo
gives the wrapped session object type

Specified by:
getWrappedType in interface IClientSessionInfo<javax.servlet.http.HttpSession>
Returns:
class of the wrapped protocol specific session object