com.sibvisions.rad.server
Class DefaultSessionManager

java.lang.Object
  extended by javax.rad.server.AbstractSessionManager
      extended by com.sibvisions.rad.server.DefaultSessionManager

public final class DefaultSessionManager
extends AbstractSessionManager

The DefaultSessionManager handles the access to all sessions created through client connections.


Method Summary
 void addSessionListener(ISessionListener pListener)
          Adds an ISessionListener session listener to the list of known listeners.
 Object createSession(IRequest pRequest, ISerializer pSerializer, ChangedHashtable<String,Object> pProperties)
          Creates an authenticated session for an application.
 Object createSubSession(IRequest pRequest, AbstractSession pSession, ChangedHashtable<String,Object> pProperties)
          Creates a new SubSession for an already authenticated main session.
 void destroy(Object pSessionId)
          Destroyes a session and dependent sub sessions.
 AbstractSession get(Object pSessionId)
          Gets an existing session.
 ISessionListener[] getSessionListeners()
          Gets the list of known listeners.
 void removeSessionListener(ISessionListener pListener)
          Removes an ISessionListener from the list of known listeners.
 
Methods inherited from class javax.rad.server.AbstractSessionManager
getServer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public final AbstractSession get(Object pSessionId)
Gets an existing session.

Specified by:
get in class AbstractSessionManager
Parameters:
pSessionId - session identifier
Returns:
session object, guaranteed not null

addSessionListener

public final void addSessionListener(ISessionListener pListener)
Adds an ISessionListener session listener to the list of known listeners.

Specified by:
addSessionListener in class AbstractSessionManager
Parameters:
pListener - te session listener to add

removeSessionListener

public final void removeSessionListener(ISessionListener pListener)
Removes an ISessionListener from the list of known listeners.

Specified by:
removeSessionListener in class AbstractSessionManager
Parameters:
pListener - the session listener to remove

getSessionListeners

public final ISessionListener[] getSessionListeners()
Gets the list of known listeners.

Specified by:
getSessionListeners in class AbstractSessionManager
Returns:
a list of ISessionListener or an empty list

createSession

public final Object createSession(IRequest pRequest,
                                  ISerializer pSerializer,
                                  ChangedHashtable<String,Object> pProperties)
                           throws Throwable
Creates an authenticated session for an application.

Parameters:
pRequest - the request which creates the session
pSerializer - the serializer for the session
pProperties - the initial session properties
Returns:
session identifier of newly created Session
Throws:
Throwable - if the security manager detects a problem or the session properties can not be set

createSubSession

public final Object createSubSession(IRequest pRequest,
                                     AbstractSession pSession,
                                     ChangedHashtable<String,Object> pProperties)
                              throws Throwable
Creates a new SubSession for an already authenticated main session. This method doesn't check if the session is valid.

Parameters:
pRequest - the request which creates the sub session
pSession - a valid session
pProperties - the initial session properties
Returns:
the new SubSession
Throws:
Throwable - the session properties can not be set

destroy

public final void destroy(Object pSessionId)
Destroyes a session and dependent sub sessions.

Parameters:
pSessionId - session identifier
Throws:
SecurityException - if the session identifier is unknown


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.