Java Doc for StandardSessionManager.java in  » J2EE » Enhydra-Application-Framework » com » lutris » appserver » server » sessionEnhydra » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » Enhydra Application Framework » com.lutris.appserver.server.sessionEnhydra 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.lutris.appserver.server.sessionEnhydra.StandardSessionManager

All known Subclasses:   com.lutris.appserver.server.sessionEnhydra.SimpleServletSessionManager,
StandardSessionManager
public class StandardSessionManager implements SessionManager,StandardSessionIdleHandler(Code)
This session manager maintains the mapping between session keys and sessions. It generates secure session keys that are safe to use as cookie values in web applications. It also manages the life of a session. If a session is not used (touched) for a preconfigured amount of time, then it is expired and removed from the session manager. The following parameters can be used to configure the session manager. They should be grouped together in a section, normally SessionManager, which is specified to the constructor.

  • SessionLifetimeMax: {int}

    The maximum number of minutes a session is valid. If this value us zero, then there is no lifetime limit. This parameter must be set in the configuration file.

  • SessionIdleTimeMax: {int}

    Maximum number of minutes a session may be idle before the session is expired (deleted). If this value is less than or equal to zero, then the session may be idle indefinitly.

  • SessionNoUserIdleTimeMax: {int}

    Maximum number of minutes a session that does not have a User object assocaited with it may be idle before the session is expired (deleted). If this value is less than or equal to zero, then the session may be idle indefinitly. Default is the same as MaxIdleTime

  • IdleScanInterval: {int}

    How often, in seconds, the session manager tests if any sessions should be expired. This parameter must be greater than zero.

  • RandomizerIntervals: {int [,int]...}

    The set of varying intervals to use for adding user-generated entropy to the random number generator. It is a good idea to use several different prime numbers. These intervals are in seconds.

  • SessionHome.Mode: {BASIC | PAGE_TO_DISK | PAGE_TO_DB | CUSTOM}

    Indicates the mode (StandardSessionHome interface) that the standard session manager will use. In 'BASIC' mode the standard session manager uses the BasicSessionHome to manage sessions. In 'PAGE_TO_DISK' the standard session manager uses the DiskPagedSessionHome to manage sessions. In 'PAGE_TO_DB' the standard session manager used the PersistentSessionHome to manage sessions. In 'CUSTOM' the application specifies the classes that should be loaded and provide the StandardSessionHome implementation. If set to 'CUSTOM' then the settings SessionHome.Class and SessionUserTable.Class should be set.

  • SessionHome.Class: {String}

    The class that implements the StandardSessionHome interface. This class is loaded by StandardSessionManager and used to managed the collection of sessions. If this option is not specified then BasicSessionHome is used. The SessionHome that is loaded by the session manager is expected to contain a consturctor that takes the following arguments: SessionHome(StandardSessionManager mgr, com.lutris.util.Config config, ClassLoader loader)

  • SessionUserTable.Class: {String}

    The class that implements the StandardSessiondUserTable interface. This class is loaded by StandardSessionManager and used to managed the session to user relationships. If this option is not specified then BasicSessionUserTable is used. The SessionUserTable that is loaded by the session manager is expected to contain a consturctor that takes the following arguments: SessionUserTable(com.lutris.util.Config config)

  • MemoryPersistence: {true|false}

    Indicate that should we keep sessions in memory when stop application


version:
   $Revision: 1.4 $
author:
   John Marco
author:
   Shawn McMurdo
author:
   Kyle Clark
author:
   Mark Diekhans
See Also:   com.lutris.util.Config
See Also:   StandardSessionHome
See Also:   StandardSessionUserTable
See Also:   BasicSessionHome
See Also:   DiskPagedSessionHome
See Also:   com.lutris.appserver.server.sessionEnhydra.persistent.PersistentSessionHome


Field Summary
final public static  StringCFG_EMPTY_SESSION_PATH
     The name of the config variable for the EmptySessionPath.
final public static  StringCFG_ENCODE_FIRST_URL
    
final public static  StringCFG_ENCODE_URL_STATE
    
final public static  StringCFG_IDLE
     The name of the config variable for the max session idle time.
final public static  StringCFG_LIFE
     The name of the config variable for the max session lifetime.
final public static  StringCFG_NOUSER_IDLE
     The name of the config variable for the max idle time for sessions with no user.
final public static  StringCFG_RANDOM
     The name of the config variable for the interval between introduction of randomness to the session key generator.
final public static  StringCFG_SCAN
     The name of the config variable for the interval between scans for idle sessions.
final public static  StringCFG_SESSION_HOME
     The name of the config variable for the session home settings.
final public static  StringCFG_SESSION_HOME_TYPE
     The name of the config variable for the session home type.
final public static  StringENCODE_RANDOM_NO
    
final public static  StringENCODE_RANDOM_YES
    
final public static  StringENCODE_URL_ALWAYS
     Indicates that url encoding of session ids is always preformed.
final public static  StringENCODE_URL_AUTO
     Indicates that url encoding of session ids is preformed only when cookies are disabled on the client browser.
final public static  StringENCODE_URL_NEVER
     Indicates that url encoding of session ids is never preformed.
final public static  intMODE_BASIC
     Indicates that the session manager is using the basic session home interface to manage sessions.
final public static  intMODE_CUSTOM
     Indicates that the session manager is using the custom home interface to manage sessions.
final public static  intMODE_PAGE_TO_DB
     Indicates that the session manager is using the page to database home interface to manage sessions.
final public static  intMODE_PAGE_TO_DISK
     Indicates that the session manager is using the page to disk home interface to manage sessions.
final public static  intSESSION_ACTIVE
     Indicates that a sesson is still active.
final public static  intSESSION_EXPLICT_DELETE
     Indicates that a sesson was explictly deleted.
final public static  intSESSION_IDLE_EXPIRE
     Indicates that a sesson was deleted due to idle time being exceeded.
final public static  intSESSION_MAX_TIME
     Indicates that a sesson was deleted due to max time being exceeded.
 Applicationapp
     The application using this session manager.
 ClassLoaderclassLoader
     The class loader used by this app/context.
protected static  booleandefaultEmptySessionPath
     Determins whether to use empty path (/) as session cookie path attribute value! Default value is false which means - use application context path.
protected static  StringdefaultEncodeUrlState
     Indicates url encoding status.
protected static  longdefaultIdleScanInterval
     Default interval, in seconds, to scan for sessions to expire.
protected static  longdefaultMaxSessionIdleTime
     Default maximum session idle time, in seconds.
protected static  longdefaultMaxSessionLifeTime
     Default maximum session life time, in seconds.
protected static  long[]defaultRandomizerIntervals
     Default list of randomize key generator time intervals, in seconds.
protected  booleanemptySessionPath
    
protected  booleanencodeFirstUrl
    
protected  StringencodeUrlState
     The url encoding state.
 LogChannellogChannel
     Log channel for debugging messages.
protected  longmaxNoUserSessionIdleTime
     Maximum session idle time, in seconds for sessions that don't have a User object associated with them.
protected  longmaxSessionIdleTime
     Maximum session idle time, in seconds.
protected  intmaxSessions
    
protected  DatemaxSessionsDate
    
protected  intmode
     Represents the current session management mode.
protected  longscanInterval
     The time in seconds between scans for idle sessions to expire.
protected  StandardSessionHomesessionHome
     Table of currently active user sessions is managed by the session home. Different implementations of StandardSessionHome can be loaded by this manager.
 StringsessionHomeType
     The session home interface type being used.

Constructor Summary
public  StandardSessionManager()
    
public  StandardSessionManager(Application application, Config config, LogChannel sessionMgrLogChannel)
     Creates a new SessionManager object.
public  StandardSessionManager(ClassLoader classLoader, Config config, LogChannel sessionMgrLogChannel)
    

Method Summary
public  intactiveSessionCount()
     Gets the number of currently active sessions.
public  voidcleanUpIdleSessions()
     Scans session table to determine if any sessions need to be expired.
public  SessioncreateSession()
     Create a new Session object and associate a unique random key.
public  SessioncreateSession(String ipPortToken)
     Create a new Session object and associate a unique random key.
public  SessioncreateSession(HttpPresentationComms comms)
    
protected  voiddebug(int level, String msg)
     Prints debug information under Logger.DEBUG.
public synchronized  voiddeleteSession(Session session)
     Removes a session from the Session Table.
public synchronized  voiddeleteSession(String sessionKey)
     Removes a session from the Session Table.
public  booleangetEmptySessionPath()
    
public  booleangetEncodeFirstUrl()
     Returns the url encoding rule for the first application page (true/false).
public  StringgetEncodeUrlState()
     Returns the url encoding state.
public  longgetMaxNoUserSessionIdleTime()
     Returns the maximum no-user session idle time, in seconds.
public  longgetMaxSessionIdleTime()
     Returns the maximum session idle time, in seconds.
public  longgetMaxSessionLifeTime()
     Returns the maximum session life time, in seconds.
public  intgetMode()
     Returns the current mode for the session manager.
public synchronized  SessiongetSaveSession(Thread thread, String sessionKey)
     Lookup the Session object associated with the specified session key.

Each time a session is returned via this method, the session's last used (referenced) time is NOT!!! updated to the current time. This method is for save reporting without change the last time used.
Parameters:
  thread - the thread to associate with the session.
Parameters:
  sessionKey - The String used to reference a Session object.

public synchronized  SessiongetSession(String sessionKey)
     Lookup the Session object associated with the specified session key.

Each time a session is returned via this method, the session's last used (referenced) time is updated to the current time.
Parameters:
  sessionKey - The String used to reference a Session object.

public synchronized  SessiongetSession(Thread thread, String sessionKey)
     Lookup the Session object associated with the specified session key.

Each time a session is returned via this method, the session's last used (referenced) time is updated to the current time.
Parameters:
  thread - the thread to associate with the session.
Parameters:
  sessionKey - The String used to reference a Session object.

public synchronized  SessiongetSession(Thread thread, String sessionKey, HttpPresentationComms comms)
    
public synchronized  EnumerationgetSessionKeys()
     Get all of the active sessions.
public synchronized  EnumerationgetSessionKeys(User user)
     Lookup the keys for the active sessions for a user.
protected  intisSessionExpired(StandardSession session)
     Determine if a session should be expired based on the idle time.
protected  StandardSessionHomeloadSessionHome(Config config)
     Loads the StandardSessionHome used by this session manager.
protected  StandardSessionUserTableloadSessionUserTable(Config config)
     Loads the StandardSessiondUserTable used by this session manager.
public  intmaxSessionCount()
     Gets the maximum number of concurent sessions that existed at any time since this object was created, or resetMaxSessionCount() was called.
public  DatemaxSessionCountDate()
     Gets the time when the maximum refered to by maxSessionCount() occured.
protected  StandardSessionnewSession(String sessionKey)
     Allocate a new StandardSession object.
public  intpagedSessionCount()
     Gets the number of session that are paged to persistent store.
public  voidpassivateSession(Thread thread, String sessionKey)
     Puts a session into the 'passive' state.
protected synchronized  voidregisterUser(Session session)
     Adds a session's user to the session-to-user table.
public  voidresetMaxSessionCount()
     Reset the maximum session count.
protected  voidsessionDeleted(Session session, int reason)
     Method called when a session is deleted.
public synchronized  booleansessionExists(String sessionKey)
     Returns whether the Session object associated with the specified session key exists.
Parameters:
  sessionKey - The String used to reference a Session object.
public  voidsetMaxSessionIdleTime(long maxSessionIdleTime)
     Sets the maximum session idle time, in seconds.
public synchronized  voidshutdown()
     Shutdown this session manager, stopping threads that are associated with it.
protected synchronized  voidunregisterUser(Session session)
     Removes a session's user from the session-to-user table.

Field Detail
CFG_EMPTY_SESSION_PATH
final public static String CFG_EMPTY_SESSION_PATH(Code)
The name of the config variable for the EmptySessionPath.



CFG_ENCODE_FIRST_URL
final public static String CFG_ENCODE_FIRST_URL(Code)
Url encoding for first page state (to force it or not) CFG_ENCODE_URL_STATE must not be set to NEVER for this parameter to take efect



CFG_ENCODE_URL_STATE
final public static String CFG_ENCODE_URL_STATE(Code)
The name of the config variable for the url encoding state



CFG_IDLE
final public static String CFG_IDLE(Code)
The name of the config variable for the max session idle time.



CFG_LIFE
final public static String CFG_LIFE(Code)
The name of the config variable for the max session lifetime.



CFG_NOUSER_IDLE
final public static String CFG_NOUSER_IDLE(Code)
The name of the config variable for the max idle time for sessions with no user.



CFG_RANDOM
final public static String CFG_RANDOM(Code)
The name of the config variable for the interval between introduction of randomness to the session key generator.



CFG_SCAN
final public static String CFG_SCAN(Code)
The name of the config variable for the interval between scans for idle sessions.



CFG_SESSION_HOME
final public static String CFG_SESSION_HOME(Code)
The name of the config variable for the session home settings.



CFG_SESSION_HOME_TYPE
final public static String CFG_SESSION_HOME_TYPE(Code)
The name of the config variable for the session home type.



ENCODE_RANDOM_NO
final public static String ENCODE_RANDOM_NO(Code)



ENCODE_RANDOM_YES
final public static String ENCODE_RANDOM_YES(Code)



ENCODE_URL_ALWAYS
final public static String ENCODE_URL_ALWAYS(Code)
Indicates that url encoding of session ids is always preformed.
See Also:   StandardSessionManager.getEncodeUrlState



ENCODE_URL_AUTO
final public static String ENCODE_URL_AUTO(Code)
Indicates that url encoding of session ids is preformed only when cookies are disabled on the client browser. This is automatically detected.
See Also:   StandardSessionManager.getEncodeUrlState



ENCODE_URL_NEVER
final public static String ENCODE_URL_NEVER(Code)
Indicates that url encoding of session ids is never preformed.
See Also:   StandardSessionManager.getEncodeUrlState



MODE_BASIC
final public static int MODE_BASIC(Code)
Indicates that the session manager is using the basic session home interface to manage sessions.
See Also:   StandardSessionManager.getMode
See Also:   com.lutris.appserver.server.sessionEnhydra.BasicSessionHome



MODE_CUSTOM
final public static int MODE_CUSTOM(Code)
Indicates that the session manager is using the custom home interface to manage sessions.
See Also:   StandardSessionManager.getMode



MODE_PAGE_TO_DB
final public static int MODE_PAGE_TO_DB(Code)
Indicates that the session manager is using the page to database home interface to manage sessions.
See Also:   StandardSessionManager.getMode
See Also:   com.lutris.appserver.server.sessionEnhydra.persistent.PersistentSessionHome



MODE_PAGE_TO_DISK
final public static int MODE_PAGE_TO_DISK(Code)
Indicates that the session manager is using the page to disk home interface to manage sessions.
See Also:   StandardSessionManager.getMode
See Also:   com.lutris.appserver.server.sessionEnhydra.DiskPagedSessionHome



SESSION_ACTIVE
final public static int SESSION_ACTIVE(Code)
Indicates that a sesson is still active.
See Also:   StandardSessionManager.sessionDeleted



SESSION_EXPLICT_DELETE
final public static int SESSION_EXPLICT_DELETE(Code)
Indicates that a sesson was explictly deleted.
See Also:   StandardSessionManager.sessionDeleted



SESSION_IDLE_EXPIRE
final public static int SESSION_IDLE_EXPIRE(Code)
Indicates that a sesson was deleted due to idle time being exceeded.
See Also:   StandardSessionManager.sessionDeleted



SESSION_MAX_TIME
final public static int SESSION_MAX_TIME(Code)
Indicates that a sesson was deleted due to max time being exceeded.
See Also:   StandardSessionManager.sessionDeleted



app
Application app(Code)
The application using this session manager.



classLoader
ClassLoader classLoader(Code)
The class loader used by this app/context.



defaultEmptySessionPath
protected static boolean defaultEmptySessionPath(Code)
Determins whether to use empty path (/) as session cookie path attribute value! Default value is false which means - use application context path.



defaultEncodeUrlState
protected static String defaultEncodeUrlState(Code)
Indicates url encoding status. Assumes that comms.response.writeHTML(HTMLDocument doc) is used to commit the response to the client. The default is to Auto.
Never indicates urls are never encoded with session keys. This indicates that session cookies have to be used or no session state can be maintained.
Always indicates that urls are always encoded with session keys. Session cookies are never used.
Auto indicates that session cookies will be if available. If not, urls will automatically be encoded.

See Also:   StandardSessionManager.getEncodeUrlState



defaultIdleScanInterval
protected static long defaultIdleScanInterval(Code)
Default interval, in seconds, to scan for sessions to expire. A derived SessionManager may override this value. Default value is 30 seconds.



defaultMaxSessionIdleTime
protected static long defaultMaxSessionIdleTime(Code)
Default maximum session idle time, in seconds. A derived SessionManager may override this value to use the default expiration logic or override isSessionExpired to define custom expiration logic. A value less-than or equal to zero disables idle checking. Default value is 30 minutes.
See Also:   StandardSessionManager.getMaxSessionIdleTime



defaultMaxSessionLifeTime
protected static long defaultMaxSessionLifeTime(Code)
Default maximum session life time, in seconds. Zero if there is no limit. A derived SessionManager may override this value to use the default expiration logic or override isSessionExpired to define custom expiration logic.
See Also:   lutris.session.StandardSessionManager.getMaxSessionLifeTime



defaultRandomizerIntervals
protected static long[] defaultRandomizerIntervals(Code)
Default list of randomize key generator time intervals, in seconds. A list of prime numbers is recommended. A derived SessionManager may override this value.



emptySessionPath
protected boolean emptySessionPath(Code)
determins whether to use empty path (/) as session cookie path attribute value!



encodeFirstUrl
protected boolean encodeFirstUrl(Code)
Url encoding for first page state (force it or not)



encodeUrlState
protected String encodeUrlState(Code)
The url encoding state. Either Never Always Auto.



logChannel
LogChannel logChannel(Code)
Log channel for debugging messages.



maxNoUserSessionIdleTime
protected long maxNoUserSessionIdleTime(Code)
Maximum session idle time, in seconds for sessions that don't have a User object associated with them. A value less-than or equal to zero disables idle checking.
See Also:   StandardSessionManager.getMaxNoUserSessionIdleTime



maxSessionIdleTime
protected long maxSessionIdleTime(Code)
Maximum session idle time, in seconds. A value less-than or equal to zero disables idle checking.
See Also:   StandardSessionManager.getMaxSessionIdleTime



maxSessions
protected int maxSessions(Code)



maxSessionsDate
protected Date maxSessionsDate(Code)



mode
protected int mode(Code)
Represents the current session management mode.



scanInterval
protected long scanInterval(Code)
The time in seconds between scans for idle sessions to expire.



sessionHome
protected StandardSessionHome sessionHome(Code)
Table of currently active user sessions is managed by the session home. Different implementations of StandardSessionHome can be loaded by this manager. A specific implementation can manage failover persistence, paging, etc.



sessionHomeType
String sessionHomeType(Code)
The session home interface type being used.




Constructor Detail
StandardSessionManager
public StandardSessionManager()(Code)



StandardSessionManager
public StandardSessionManager(Application application, Config config, LogChannel sessionMgrLogChannel) throws ConfigException, SessionException(Code)
Creates a new SessionManager object. This constructor will first looks for the session manager configuration parameters that have the specified configuration prefix prepended to the standard session manager configuration option.


Parameters:
  app - the application associate with this session manager.
Parameters:
  config - Object parsed from configuration file. This should be for thesection constaining the session manager configuration.
Parameters:
  sessionMgrLogChannel - If not null, channel to log debugginginformation to.
exception:
  ConfigException - signifies a problem in the configuration file.
exception:
  SessionException - if all classes (Home and UserTable) couldn't be loaded bythe session manager.




StandardSessionManager
public StandardSessionManager(ClassLoader classLoader, Config config, LogChannel sessionMgrLogChannel) throws ConfigException, SessionException(Code)




Method Detail
activeSessionCount
public int activeSessionCount() throws SessionException(Code)
Gets the number of currently active sessions. The number of currently active sessions.
exception:
  SessionException - If the session cannot be calculated.



cleanUpIdleSessions
public void cleanUpIdleSessions() throws SessionException(Code)
Scans session table to determine if any sessions need to be expired.
exception:
  SessionException - if an error occurs.



createSession
public Session createSession() throws SessionException(Code)
Create a new Session object and associate a unique random key. No User is initially associated with (Session.getUser() returns null/ session The new Session object.
exception:
  SessionException - if the session cannot be created.
See Also:   Session



createSession
public Session createSession(String ipPortToken) throws SessionException(Code)
Create a new Session object and associate a unique random key. No User is initially associated with (Session.getUser() returns null/
Parameters:
  ipPortToken - The base64 encoded IP and Port number to include in sessionkey session The new Session object.
exception:
  SessionException - if the session cannot be created.
See Also:   Session



createSession
public Session createSession(HttpPresentationComms comms) throws SessionException(Code)



debug
protected void debug(int level, String msg)(Code)
Prints debug information under Logger.DEBUG.
Parameters:
  level - the debug level.
Parameters:
  msg - the message to print.



deleteSession
public synchronized void deleteSession(Session session) throws SessionException(Code)
Removes a session from the Session Table. This method is used to log a user off the application. Note that sessionDeleted() is called.
Parameters:
  session - Session object to remove from table removed.
exception:
  SessionException - If the session cannot be deleted.



deleteSession
public synchronized void deleteSession(String sessionKey) throws SessionException(Code)
Removes a session from the Session Table. This method is used to log a user off the application. Note that sessionDeleted() is called.
Parameters:
  sessionKey - A key corresponding to a user session to be removed.
exception:
  SessionException - If the session cannot be deleted.



getEmptySessionPath
public boolean getEmptySessionPath()(Code)



getEncodeFirstUrl
public boolean getEncodeFirstUrl()(Code)
Returns the url encoding rule for the first application page (true/false). CFG_ENCODE_URL_STATE must not be set to NEVER for this parameter to take efect



getEncodeUrlState
public String getEncodeUrlState()(Code)
Returns the url encoding state. Either Never Always Auto



getMaxNoUserSessionIdleTime
public long getMaxNoUserSessionIdleTime()(Code)
Returns the maximum no-user session idle time, in seconds.



getMaxSessionIdleTime
public long getMaxSessionIdleTime()(Code)
Returns the maximum session idle time, in seconds.



getMaxSessionLifeTime
public long getMaxSessionLifeTime()(Code)
Returns the maximum session life time, in seconds.



getMode
public int getMode() throws SessionException(Code)
Returns the current mode for the session manager. the mode.
exception:
  SessionException - If the mode cannot be determined.
See Also:   StandardSessionManager.MODE_BASIC
See Also:   StandardSessionManager.MODE_PAGE_TO_DISK
See Also:   StandardSessionManager.MODE_PAGE_TO_DB
See Also:   StandardSessionManager.MODE_CUSTOM



getSaveSession
public synchronized Session getSaveSession(Thread thread, String sessionKey) throws SessionException(Code)
Lookup the Session object associated with the specified session key.

Each time a session is returned via this method, the session's last used (referenced) time is NOT!!! updated to the current time. This method is for save reporting without change the last time used.
Parameters:
  thread - the thread to associate with the session.
Parameters:
  sessionKey - The String used to reference a Session object. If the key is associated with an active session, then thecorresponding Session object is returned.Otherwise null is returned.
See Also:   Session
See Also:   StandardSession.touch
exception:
  SessionException - If the session cannot be retrieved.
author:
   schubi@die-schubis.de




getSession
public synchronized Session getSession(String sessionKey) throws SessionException(Code)
Lookup the Session object associated with the specified session key.

Each time a session is returned via this method, the session's last used (referenced) time is updated to the current time.
Parameters:
  sessionKey - The String used to reference a Session object. If the key is associated with an active session, then thecorresponding Session object is returned.Otherwise null is returned.
See Also:   Session
See Also:   StandardSession.touch
exception:
  SessionException - If the session cannot be retrieved.




getSession
public synchronized Session getSession(Thread thread, String sessionKey) throws SessionException(Code)
Lookup the Session object associated with the specified session key.

Each time a session is returned via this method, the session's last used (referenced) time is updated to the current time.
Parameters:
  thread - the thread to associate with the session.
Parameters:
  sessionKey - The String used to reference a Session object. If the key is associated with an active session, then thecorresponding Session object is returned.Otherwise null is returned.
See Also:   Session
See Also:   StandardSession.touch
exception:
  SessionException - If the session cannot be retrieved.




getSession
public synchronized Session getSession(Thread thread, String sessionKey, HttpPresentationComms comms) throws SessionException(Code)
Support for director connector Director connector sets header :affCR: , in that case we need to delete active session and create new one , with new ipPortToken



getSessionKeys
public synchronized Enumeration getSessionKeys() throws SessionException(Code)
Get all of the active sessions. An enumeration of the active sessions.
exception:
  SessionException - If the sessions cannot be retrieved.



getSessionKeys
public synchronized Enumeration getSessionKeys(User user) throws SessionException(Code)
Lookup the keys for the active sessions for a user. A given user may have multiple sessions associated with it (using FTP as an example, the "anonymous" account).
Parameters:
  user - The user to search for. An enumeration containing the session keys of the active sessionsfor the user.
exception:
  SessionException - If the sessions cannot be retrieved.



isSessionExpired
protected int isSessionExpired(StandardSession session)(Code)
Determine if a session should be expired based on the idle time. This method is designed to be overriden by derived classes that want to use different idle time checks.
Parameters:
  session - Session to check. A reason code for the experation. One of SESSION_MAX_TIME,SESSION_IDLE_EXPIRE, or SESSION_ACTIVE,to indicate that the session is not expired.
See Also:   StandardSessionManager.sessionDeleted
See Also:   StandardSessionManager.maxSessionIdleTime
See Also:   StandardSessionManager.maxNoUserSessionIdleTime



loadSessionHome
protected StandardSessionHome loadSessionHome(Config config) throws ConfigException, SessionException(Code)
Loads the StandardSessionHome used by this session manager.
Parameters:
  config - This session manager's config section.
exception:
  ConfigException - if the configuration is invalid.
exception:
  SessionException - if the StandardSessionHome could not be loaded.



loadSessionUserTable
protected StandardSessionUserTable loadSessionUserTable(Config config) throws ConfigException, SessionException(Code)
Loads the StandardSessiondUserTable used by this session manager.
Parameters:
  config - This session manager's config section.
exception:
  ConfigException - if the StandardSessionHome could not be loaded.



maxSessionCount
public int maxSessionCount()(Code)
Gets the maximum number of concurent sessions that existed at any time since this object was created, or resetMaxSessionCount() was called. This is a historical highwater mark. The highwater mark for number of sessions, or -1.



maxSessionCountDate
public Date maxSessionCountDate()(Code)
Gets the time when the maximum refered to by maxSessionCount() occured. The Date of when the maximum number of sessions occured.



newSession
protected StandardSession newSession(String sessionKey) throws CreateSessionException, SessionException(Code)
Allocate a new StandardSession object. This maybe overridden by derived session managers to allocated a Session object derived from StandardSession. This is called by createSession.
Parameters:
  sessionKey - The session key to associate with the session. session The new StandardSession object.
See Also:   StandardSession



pagedSessionCount
public int pagedSessionCount() throws SessionException(Code)
Gets the number of session that are paged to persistent store. The number of currently paged sessions.
exception:
  SessionException - If the session cannot be calculated.



passivateSession
public void passivateSession(Thread thread, String sessionKey) throws SessionException(Code)
Puts a session into the 'passive' state. A 'passive' session may be made persistent.
Parameters:
  thread - the thread currently associated with the session.
Parameters:
  sessionKey - the session key for the session that will be made persistent.
exception:
  SessionException - If the session cannot be put into the passive state.



registerUser
protected synchronized void registerUser(Session session) throws SessionException(Code)
Adds a session's user to the session-to-user table. This is called by the Session object to associate a session with a user.
Parameters:
  session - The now logged-in Session instance to store inthe session table.
See Also:   Session
See Also:   User
See Also:   StandardSessionManager.unregisterUser
exception:
  SessionException - if an error occurs.



resetMaxSessionCount
public void resetMaxSessionCount() throws SessionException(Code)
Reset the maximum session count. See maxSessionCount(). The highwater mark should be reset to the current number of sessions.
exception:
  SessionException - if the max session count cannot be reset.



sessionDeleted
protected void sessionDeleted(Session session, int reason)(Code)
Method called when a session is deleted. This method is designed to be overriden by derived classes that want need to take specific action, such as saving the sessions state. The default implementation of this method does nothing.
Parameters:
  session - Session that is being delete.
Parameters:
  reason - The reason the session was being deleted. One of SESSION_MAX_TIME,SESSION_IDLE_EXPIRE, SESSION_EXPLICT_DELETE.
See Also:   StandardSessionManager.isSessionExpired



sessionExists
public synchronized boolean sessionExists(String sessionKey) throws SessionException(Code)
Returns whether the Session object associated with the specified session key exists.
Parameters:
  sessionKey - The String used to reference a Session object. If the key is associated with an active session, then returntrue, otherwise return false.
exception:
  SessionException - If existence of the session cannot be tested.



setMaxSessionIdleTime
public void setMaxSessionIdleTime(long maxSessionIdleTime)(Code)
Sets the maximum session idle time, in seconds.



shutdown
public synchronized void shutdown()(Code)
Shutdown this session manager, stopping threads that are associated with it.



unregisterUser
protected synchronized void unregisterUser(Session session) throws SessionException(Code)
Removes a session's user from the session-to-user table. This is called by the Session object to disassoicate a user from a session.
Parameters:
  session - The now Session instance the user is beinglogged out from.
See Also:   Session
exception:
  SessionException - if an error occurs.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.