com.sun.grizzly.tcp.http11
Class GrizzlySession

java.lang.Object
  extended by com.sun.grizzly.tcp.http11.GrizzlySession

public class GrizzlySession
extends Object

Simple session object used.

Author:
Jeanfrancois Arcand

Constructor Summary
GrizzlySession()
           
GrizzlySession(String requestedSessionId)
          Create a new session using a session identifier
 
Method Summary
 ConcurrentHashMap<String,Object> atttibutes()
          Return a ConcurrentHashMap of attibutes.
 Object getAttribute(String key)
          Return an attribute.
 String getIdInternal()
          Return the session identifier for this session.
 long getSessionTimeout()
          Return a long representing the maximum idle time a session can be.
 long getTimestamp()
          Return the timespam when this session has been created.
 boolean isValid()
          Is the current Session valid?
 Object removeAttribute(String key)
          Remove an attribute.
 void setAttribute(String key, Object value)
          Add an attribute to this session.
 void setIdInternal(String requestedSessionId)
          Return the session identifier for this session.
 void setIsValid(boolean isValid)
          Set this object valifity.
 void setSessionTimeout(long sessionTimeout)
          Set a long representing the maximum idle time a session can be.
 void setTimestamp(long timestamp)
          Set the timespam when this session has been created.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrizzlySession

public GrizzlySession()

GrizzlySession

public GrizzlySession(String requestedSessionId)
Create a new session using a session identifier

Parameters:
requestedSessionId - session identifier
Method Detail

isValid

public boolean isValid()
Is the current Session valid?

Returns:
true if valid.

setIsValid

public void setIsValid(boolean isValid)
Set this object valifity.

Parameters:
isValid -

getIdInternal

public String getIdInternal()
Return the session identifier for this session.


setIdInternal

public void setIdInternal(String requestedSessionId)
Return the session identifier for this session.


setAttribute

public void setAttribute(String key,
                         Object value)
Add an attribute to this session.

Parameters:
key -
value -

getAttribute

public Object getAttribute(String key)
Return an attribute.

Parameters:
key -
Returns:
an attribute

removeAttribute

public Object removeAttribute(String key)
Remove an attribute.

Parameters:
key -
Returns:
true if successful.

atttibutes

public ConcurrentHashMap<String,Object> atttibutes()
Return a ConcurrentHashMap of attibutes.

Returns:

getSessionTimeout

public long getSessionTimeout()
Return a long representing the maximum idle time a session can be.

Returns:
a long representing the maximum idle time a session can be.

setSessionTimeout

public void setSessionTimeout(long sessionTimeout)
Set a long representing the maximum idle time a session can be.

Parameters:
sessionTimeout - a long representing the maximum idle time a session can be.

getTimestamp

public long getTimestamp()
Return the timespam when this session has been created.

Returns:

setTimestamp

public void setTimestamp(long timestamp)
Set the timespam when this session has been created.

Parameters:
timestamp - a long representin when the session has been created.


Copyright © 2009 SUN Microsystems. All Rights Reserved.