org.sr.server
Interface IClientSessionInfo<E>

Type Parameters:
E -
All Known Implementing Classes:
HttpClientSession

public interface IClientSessionInfo<E>

Protocol session information wrapper

Author:
Serhat Dirik

Method Summary
 java.lang.Object getAttribute(java.lang.String name)
          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
 E getWrappedSession()
          Gives the protocol specific session object
 java.lang.Class<E> getWrappedType()
          gives the wrapped session object type
 void invalidate()
          Invalidates the client session
 void removeAttribute(java.lang.String name)
          Removes an attribute from the session
 void setAttribute(java.lang.String name, java.lang.Object value)
          Saves an attribute in client session
 

Method Detail

getWrappedSession

E getWrappedSession()
Gives the protocol specific session object

Returns:
protocol specific session

getWrappedType

java.lang.Class<E> getWrappedType()
gives the wrapped session object type

Returns:
class of the wrapped protocol specific session object

getAttribute

java.lang.Object getAttribute(java.lang.String name)
Gives the attribute value that saved in the session previously

Parameters:
name - name of the attribute
Returns:
null if there is no attribute saved previously

getAttributeNames

java.util.Enumeration<java.lang.String> getAttributeNames()
Gives all attributes that are saved within the session

Returns:
saved attributes in the session

getId

java.lang.String getId()
Unique session identifier

Returns:
session UUID

invalidate

void invalidate()
Invalidates the client session


removeAttribute

void removeAttribute(java.lang.String name)
Removes an attribute from the session

Parameters:
name - name of the attribute

setAttribute

void setAttribute(java.lang.String name,
                  java.lang.Object value)
Saves an attribute in client session

Parameters:
name - name of the attribute
value - value of the attribute. In order to support session serialization, save only serializable objects