Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mortbay.jetty.servlet
Class HashSessionManager

    java.lang.Object
      org.mortbay.component.AbstractLifeCycle
          org.mortbay.jetty.servlet.AbstractSessionManager
              org.mortbay.jetty.servlet.HashSessionManager

All Implemented Interfaces:
  LifeCycle, SessionManager

    public class HashSessionManager

extends AbstractSessionManager

An in-memory implementation of SessionManager.

Author:
  Greg Wilkins (gregw)

Nested Class Summary
`protected class` | `HashSessionManager.ClassLoadingObjectInputStream`
`protected class` | `HashSessionManager.Session`

Nested classes/interfaces inherited from class org.mortbay.jetty.servlet.AbstractSessionManager
`AbstractSessionManager.NullSessionContext, AbstractSessionManager.SessionIf`

Nested classes/interfaces inherited from interface org.mortbay.component.LifeCycle
`LifeCycle.Listener`

Field Summary
`protected java.util.Map` | `_sessions`

Fields inherited from class org.mortbay.jetty.servlet.AbstractSessionManager
`__distantFuture, _context, _dftMaxIdleSecs, _httpOnly, _loader, _maxCookieAge, _maxSessions, _minSessions, _nodeIdInSessionId, _refreshCookieAge, _secureCookies, _sessionAttributeListeners, _sessionCookie, _sessionDomain, _sessionHandler, _sessionIdManager, _sessionListeners, _sessionPath, _sessionURL, _sessionURLPrefix`

Fields inherited from class org.mortbay.component.AbstractLifeCycle
`_listeners`

Fields inherited from interface org.mortbay.jetty.SessionManager
`__DefaultSessionCookie, __DefaultSessionDomain, __DefaultSessionURL, __MaxAgeProperty, __SessionCookieProperty, __SessionDomainProperty, __SessionPathProperty, __SessionURLProperty`

Constructor Summary
`HashSessionManager()`

Method Summary
`protected void` | `addSession(AbstractSessionManager.Session session)`
`void` | `doStart()`
`void` | `doStop()`
`int` | `getSavePeriod()`
`int` | `getScavengePeriod()`
`AbstractSessionManager.Session` | `getSession(java.lang.String idInCluster)` Get a known existingsession
`java.util.Map` | `getSessionMap()`
`int` | `getSessions()`
`java.io.File` | `getStoreDirectory()`
`protected void` | `invalidateSessions()`
`boolean` | `isLazyLoad()`
`protected AbstractSessionManager.Session` | `newSession(javax.servlet.http.HttpServletRequest request)` Create a new session instance
`protected void` | `removeSession(java.lang.String clusterId)`
`HashSessionManager.Session` | `restoreSession(java.io.FileInputStream fis)`
`void` | `restoreSessions()`
`void` | `saveSessions()`
`void` | `setLazyLoad(boolean lazyLoad)`
`void` | `setMaxInactiveInterval(int seconds)`
`void` | `setSavePeriod(int seconds)`
`void` | `setScavengePeriod(int seconds)`
`void` | `setStoreDirectory(java.io.File dir)`

Methods inherited from class org.mortbay.jetty.servlet.AbstractSessionManager
`access, addEventListener, addSession, clearEventListeners, complete, getClusterId, getHttpOnly, getHttpSession, getIdManager, getMaxCookieAge, getMaxInactiveInterval, getMaxSessions, getMetaManager, getMinSessions, getNodeId, getRefreshCookieAge, getSecureCookies, getSessionCookie, getSessionCookie, getSessionDomain, getSessionHandler, getSessionPath, getSessionURL, getSessionURLPrefix, isNodeIdInSessionId, isUsingCookies, isValid, newHttpSession, removeEventListener, removeSession, removeSession, resetStats, setHttpOnly, setIdManager, setMaxCookieAge, setMetaManager, setNodeIdInSessionId, setRefreshCookieAge, setSecureCookies, setSessionCookie, setSessionDomain, setSessionHandler, setSessionPath, setSessionURL, setUsingCookies`

Methods inherited from class org.mortbay.component.AbstractLifeCycle
`addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.mortbay.component.LifeCycle
`addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop`

Field Detail

### _sessions

    protected java.util.Map _sessions

Constructor Detail

### HashSessionManager

    public HashSessionManager()

Method Detail

### doStart

    public void doStart()
                 throws java.lang.Exception

  Overrides:
    `doStart` in class `AbstractSessionManager`
  Throws:
    `java.lang.Exception`

### doStop

    public void doStop()
                throws java.lang.Exception

  Overrides:
    `doStop` in class `AbstractSessionManager`
  Throws:
    `java.lang.Exception`

### getScavengePeriod

    public int getScavengePeriod()

  Returns:
    seconds

### getSessionMap

    public java.util.Map getSessionMap()

  Specified by:
    `getSessionMap` in class `AbstractSessionManager`

### getSessions

    public int getSessions()

  Specified by:
    `getSessions` in class `AbstractSessionManager`

### setMaxInactiveInterval

    public void setMaxInactiveInterval(int seconds)

  Specified by:
    `setMaxInactiveInterval` in interface `SessionManager`
  Overrides:
    `setMaxInactiveInterval` in class `AbstractSessionManager`

### setSavePeriod

    public void setSavePeriod(int seconds)

### getSavePeriod

    public int getSavePeriod()

### setScavengePeriod

    public void setScavengePeriod(int seconds)

  Parameters:
    `seconds` -

### addSession

    protected void addSession(AbstractSessionManager.Session session)

  Specified by:
    `addSession` in class `AbstractSessionManager`

### getSession

    public AbstractSessionManager.Session getSession(java.lang.String idInCluster)

  Description copied from class: `AbstractSessionManager`
  Get a known existingsession

  Specified by:
    `getSession` in class `AbstractSessionManager`
  Parameters:
    `idInCluster` - The session ID in the cluster, stripped of any worker name.
  Returns:
    A Session or null if none exists.

### invalidateSessions

    protected void invalidateSessions()

  Specified by:
    `invalidateSessions` in class `AbstractSessionManager`

### newSession

    protected AbstractSessionManager.Session newSession(javax.servlet.http.HttpServletRequest request)

  Description copied from class: `AbstractSessionManager`
  Create a new session instance

  Specified by:
    `newSession` in class `AbstractSessionManager`
  Returns:

### removeSession

    protected void removeSession(java.lang.String clusterId)

  Specified by:
    `removeSession` in class `AbstractSessionManager`

### setStoreDirectory

    public void setStoreDirectory(java.io.File dir)

### getStoreDirectory

    public java.io.File getStoreDirectory()

### setLazyLoad

    public void setLazyLoad(boolean lazyLoad)

### isLazyLoad

    public boolean isLazyLoad()

### restoreSessions

    public void restoreSessions()
                         throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### saveSessions

    public void saveSessions()
                      throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### restoreSession

    public HashSessionManager.Session restoreSession(java.io.FileInputStream fis)
                                              throws java.lang.Exception

  Throws:
    `java.lang.Exception`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.