org.wso2.carbon.webapp.mgt

## Class CarbonTomcatSessionManager

- java.lang.Object
- - org.apache.catalina.util.LifecycleBase
  - - org.apache.catalina.util.LifecycleMBeanBase
    - - org.apache.catalina.session.ManagerBase
      - - org.apache.catalina.session.StandardManager
        - - org.wso2.carbon.webapp.mgt.CarbonTomcatSessionManager

- All Implemented Interfaces:
    MBeanRegistration, org.apache.catalina.Lifecycle, org.apache.catalina.Manager

      public class CarbonTomcatSessionManager
      extends org.apache.catalina.session.StandardManager

  SessionManager which ensures that one tenant's sessions cannot be accessed by other tenants. Super tenant should be able to access all sessions

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.catalina.session.ManagerBase

      `org.apache.catalina.session.ManagerBase.SessionTiming`

    - ### Nested classes/interfaces inherited from interface org.apache.catalina.Lifecycle

      `org.apache.catalina.Lifecycle.SingleUse`

  - ### Field Summary

    - ### Fields inherited from class org.apache.catalina.session.StandardManager

      `info, name, pathname`

    - ### Fields inherited from class org.apache.catalina.session.ManagerBase

      `container, distributable, duplicates, expiredSessions, maxActive, maxActiveSessions, maxInactiveInterval, processExpiresFrequency, processingTime, rejectedSessions, secureRandomAlgorithm, secureRandomClass, secureRandomProvider, SESSION_ID_LENGTH_UNSET, sessionCounter, sessionCreationTiming, sessionExpirationTiming, sessionIdGenerator, sessionIdGeneratorClass, sessionIdLength, sessionMaxAliveTime, sessions, sm, support, TIMING_STATS_CACHE_SIZE`

    - ### Fields inherited from class org.apache.catalina.util.LifecycleMBeanBase

      `mserver`

    - ### Fields inherited from interface org.apache.catalina.Lifecycle

      `AFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CarbonTomcatSessionManager()`
    `CarbonTomcatSessionManager(int ownerTenantId)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.apache.catalina.Session` | `findSession(String id)`
    `org.apache.catalina.Session[]` | `findSessions()`
    `int` | `getActiveSessions()`
    `long` | `getExpiredSessions()`
    `int` | `getMaxActive()`
    `int` | `getMaxInactiveInterval()`
    `int` | `getRejectedSessions()`
    `int` | `getSessionAverageAliveTime()`
    `int` | `getSessionMaxAliveTime()`
    `void` | `setOwnerTenantId(int ownerTenantId)`

    - ### Methods inherited from class org.apache.catalina.session.StandardManager

      `doLoad, doUnload, file, getInfo, getName, getPathname, load, setPathname, startInternal, stopInternal, unload`

    - ### Methods inherited from class org.apache.catalina.session.ManagerBase

      `add, addPropertyChangeListener, backgroundProcess, changeSessionId, createEmptySession, createSession, expireSession, generateSessionId, getClassName, getContainer, getCreationTime, getCreationTimestamp, getDistributable, getDomainInternal, getDuplicates, getEngine, getJvmRoute, getLastAccessedTime, getLastAccessedTimestamp, getMaxActiveSessions, getNewSession, getObjectNameKeyProperties, getProcessExpiresFrequency, getProcessingTime, getSecureRandomAlgorithm, getSecureRandomClass, getSecureRandomProvider, getSession, getSessionAttribute, getSessionAttributeNameFilter, getSessionAttributeNamePattern, getSessionAttributeValueClassNameFilter, getSessionAttributeValueClassNamePattern, getSessionCounter, getSessionCreateRate, getSessionExpireRate, getSessionIdGenerator, getSessionIdLength, getThisAccessedTime, getThisAccessedTimestamp, getWarnOnSessionAttributeFilterFailure, initInternal, listSessionIds, processExpires, remove, remove, removePropertyChangeListener, setContainer, setDistributable, setDuplicates, setExpiredSessions, setMaxActive, setMaxActiveSessions, setMaxInactiveInterval, setProcessExpiresFrequency, setProcessingTime, setSecureRandomAlgorithm, setSecureRandomClass, setSecureRandomProvider, setSessionAttributeNameFilter, setSessionAttributeValueClassNameFilter, setSessionCounter, setSessionIdGenerator, setSessionIdLength, setSessionMaxAliveTime, setWarnOnSessionAttributeFilterFailure, toString, updateSessionMaxAliveTime, willAttributeDistribute`

    - ### Methods inherited from class org.apache.catalina.util.LifecycleMBeanBase

      `destroyInternal, getDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregister`

    - ### Methods inherited from class org.apache.catalina.util.LifecycleBase

      `addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, init, removeLifecycleListener, setState, setState, start, stop`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### CarbonTomcatSessionManager

          public CarbonTomcatSessionManager(int ownerTenantId)

    - #### CarbonTomcatSessionManager

          public CarbonTomcatSessionManager()

  - ### Method Detail

    - #### setOwnerTenantId

          public void setOwnerTenantId(int ownerTenantId)

    - #### getRejectedSessions

          public int getRejectedSessions()

      Specified by:
        `getRejectedSessions` in interface `org.apache.catalina.Manager`
      Overrides:
        `getRejectedSessions` in class `org.apache.catalina.session.ManagerBase`

    - #### getExpiredSessions

          public long getExpiredSessions()

      Specified by:
        `getExpiredSessions` in interface `org.apache.catalina.Manager`
      Overrides:
        `getExpiredSessions` in class `org.apache.catalina.session.ManagerBase`

    - #### getMaxInactiveInterval

          public int getMaxInactiveInterval()

      Specified by:
        `getMaxInactiveInterval` in interface `org.apache.catalina.Manager`
      Overrides:
        `getMaxInactiveInterval` in class `org.apache.catalina.session.ManagerBase`

    - #### findSession

          public org.apache.catalina.Session findSession(String id)
                                                  throws IOException

      Specified by:
        `findSession` in interface `org.apache.catalina.Manager`
      Overrides:
        `findSession` in class `org.apache.catalina.session.ManagerBase`
      Throws:
        `IOException`

    - #### findSessions

          public org.apache.catalina.Session[] findSessions()

      Specified by:
        `findSessions` in interface `org.apache.catalina.Manager`
      Overrides:
        `findSessions` in class `org.apache.catalina.session.ManagerBase`

    - #### getMaxActive

          public int getMaxActive()

      Specified by:
        `getMaxActive` in interface `org.apache.catalina.Manager`
      Overrides:
        `getMaxActive` in class `org.apache.catalina.session.ManagerBase`

    - #### getSessionAverageAliveTime

          public int getSessionAverageAliveTime()

      Specified by:
        `getSessionAverageAliveTime` in interface `org.apache.catalina.Manager`
      Overrides:
        `getSessionAverageAliveTime` in class `org.apache.catalina.session.ManagerBase`

    - #### getSessionMaxAliveTime

          public int getSessionMaxAliveTime()

      Specified by:
        `getSessionMaxAliveTime` in interface `org.apache.catalina.Manager`
      Overrides:
        `getSessionMaxAliveTime` in class `org.apache.catalina.session.ManagerBase`

    - #### getActiveSessions

          public int getActiveSessions()

      Specified by:
        `getActiveSessions` in interface `org.apache.catalina.Manager`
      Overrides:
        `getActiveSessions` in class `org.apache.catalina.session.ManagerBase`

Copyright © 2017 WSO2. All rights reserved.