SessionIdManager (Jetty :: Aggregate :: All core Jetty 7.6.8.v20121106 API)
Date: 2012-11-06

org.eclipse.jetty.server

## Interface SessionIdManager

- All Superinterfaces:
    LifeCycle
  All Known Implementing Classes:
    AbstractSessionIdManager, HashSessionIdManager, JDBCSessionIdManager

      public interface SessionIdManager
      extends LifeCycle

  Session ID Manager. Manages session IDs across multiple contexts.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

      `LifeCycle.Listener`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addSession(javax.servlet.http.HttpSession session)` Add a session to the list of known sessions for a given ID.
    `String` | `getClusterId(String nodeId)` Get a cluster ID from a node ID.
    `String` | `getNodeId(String clusterId, javax.servlet.http.HttpServletRequest request)` Get a node ID from a cluster ID and a request
    `String` | `getWorkerName()`
    `boolean` | `idInUse(String id)`
    `void` | `invalidateAll(String id)` Call `HttpSession.invalidate()` on all known sessions for the given id.
    `String` | `newSessionId(javax.servlet.http.HttpServletRequest request, long created)`
    `void` | `removeSession(javax.servlet.http.HttpSession session)` Remove session from the list of known sessions for a given ID.

    - ### Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle

      `addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop`

- - ### Method Detail

    - #### idInUse

          boolean idInUse(String id)

      Parameters:
        `id` - The session ID without any cluster node extension
      Returns:
        True if the session ID is in use by at least one context.

    - #### addSession

          void addSession(javax.servlet.http.HttpSession session)

      Add a session to the list of known sessions for a given ID.
      Parameters:
        `session` - The session

    - #### removeSession

          void removeSession(javax.servlet.http.HttpSession session)

      Remove session from the list of known sessions for a given ID.
      Parameters:
        `session` -

    - #### invalidateAll

          void invalidateAll(String id)

      Call `HttpSession.invalidate()` on all known sessions for the given id.
      Parameters:
        `id` - The session ID without any cluster node extension

    - #### newSessionId

          String newSessionId(javax.servlet.http.HttpServletRequest request,
                            long created)

      Parameters:
        `request` -
        `created` -
      Returns:
        the new session id

    - #### getWorkerName

          String getWorkerName()

    - #### getClusterId

          String getClusterId(String nodeId)

      Get a cluster ID from a node ID. Strip node identifier from a located session ID.
      Parameters:
        `nodeId` -
      Returns:
        the cluster id

    - #### getNodeId

          String getNodeId(String clusterId,
                         javax.servlet.http.HttpServletRequest request)

      Get a node ID from a cluster ID and a request
      Parameters:
        `clusterId` - The ID of the session
        `request` - The request that for the session (or null)
      Returns:
        The session ID qualified with the node ID.

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