ikrs.util.session
Class DefaultSession<K,V,U>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by ikrs.util.MapDelegation<K,V>
          extended by ikrs.util.EnvironmentDelegation<K,V>
              extended by ikrs.util.session.AbstractSession<K,V,U>
                  extended by ikrs.util.session.DefaultSession<K,V,U>
All Implemented Interfaces:
Environment<K,V>, Session<K,V,U>, java.util.Map<K,V>

public class DefaultSession<K,V,U>
extends AbstractSession<K,V,U>

A simple session interface. Basically a session is nothing more than a named environment that is bound to a specific system user (remote or local). Each session is identified by its unique session ID.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class ikrs.util.session.AbstractSession
sessionID
 
Constructor Summary
DefaultSession(U userID, Environment<K,V> environment)
          Creates a new DefaultSession.
DefaultSession(U userID, EnvironmentFactory<K,V> environmentFactory)
          Creates a new DefaultSession.
 
Method Summary
 
Methods inherited from class ikrs.util.session.AbstractSession
allowsMultipleChildNames, clear, containsKey, containsValue, createChild, entrySet, equals, get, getAllChildren, getChild, getChildCount, getChildren, getCreationTime, getLastAccessTime, getLastModified, getParent, getSessionID, getUserID, hashCode, isEmpty, keySet, put, putAll, remove, removeChild, size, toString, toString, values
 
Methods inherited from class ikrs.util.EnvironmentDelegation
locateChild, removeAllChildren
 
Methods inherited from class java.util.AbstractMap
clone
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ikrs.util.Environment
locateChild, removeAllChildren
 

Constructor Detail

DefaultSession

public DefaultSession(U userID,
                      EnvironmentFactory<K,V> environmentFactory)
               throws java.lang.NullPointerException
Creates a new DefaultSession.

Parameters:
userID - The session's user ID.
environment - A factory to create the base environment to use.
Throws:
java.lang.NullPointerException - If the userID or the environment factory are null.

DefaultSession

public DefaultSession(U userID,
                      Environment<K,V> environment)
               throws java.lang.NullPointerException
Creates a new DefaultSession.

Parameters:
userID - The session's user ID.
environment - The base environment to use.
Throws:
java.lang.NullPointerException - If the userID or the environment factory are null.