com.uwyn.rife.authentication.sessionmanagers
Class SimpleSessionManagerFactory

java.lang.Object
  extended by com.uwyn.rife.authentication.sessionmanagers.SimpleSessionManagerFactory
All Implemented Interfaces:
SessionManagerFactory

public class SimpleSessionManagerFactory
extends Object
implements SessionManagerFactory

Simple caching session manager factory. This keeps a cache of session manager instances by name. This is used, for example, to create MemorySessions objects; it may be used for any session manager that doesn't require configuration information at startup time.

Element properties used:

"sessionmanager_class"
Name of the session manager class. If the class name is not fully qualified, the package name com.uwyn.rife.authentication.sessionmanagers will be assumed.
"sessionmanager_id"
Unique ID for this session manager instance. Optional. Use this if you need different elements to maintain separate session stores.

If you need logic other than a simple "new" for your session managers, implement SessionManagerFactory instead.

Since:
1.6
Version:
$Revision: 3643 $
Author:
Steven Grimm (koreth[remove] at midwinter dot com), Geert Bevin (gbevin[remove] at uwyn dot com)
See Also:
SessionManager, SessionManagerFactory

Field Summary
static String PROPERTYNAME_MANAGER_CLASS
          Element property that specifies the class name for session managers.
static String PROPERTYNAME_MANAGER_ID
          Element property that specifies the ID for a session manager instance.
 
Constructor Summary
SimpleSessionManagerFactory()
           
 
Method Summary
 SessionManager getManager(HierarchicalProperties properties)
          Returns the manager specified by properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTYNAME_MANAGER_ID

public static final String PROPERTYNAME_MANAGER_ID
Element property that specifies the ID for a session manager instance.

See Also:
Constant Field Values

PROPERTYNAME_MANAGER_CLASS

public static final String PROPERTYNAME_MANAGER_CLASS
Element property that specifies the class name for session managers.

See Also:
Constant Field Values
Constructor Detail

SimpleSessionManagerFactory

public SimpleSessionManagerFactory()
Method Detail

getManager

public SessionManager getManager(HierarchicalProperties properties)
                          throws PropertyValueException
Description copied from interface: SessionManagerFactory
Returns the manager specified by properties.

The specific properties that are used are determined by the implementation class.

Specified by:
getManager in interface SessionManagerFactory
Parameters:
properties - the properties that will setup the manager
Throws:
PropertyValueException - when an error occurred during the retrieval of the property values


Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.