## 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
`void` `addSession(HttpSession session)` Add a session to the list of known sessions for a given ID.
`java.lang.String` `getClusterId(java.lang.String nodeId)` Get a cluster ID from a node ID.
`java.lang.String` `getNodeId(java.lang.String clusterId, HttpServletRequest request)` Get a node ID from a cluster ID and a request
`java.lang.String` `getWorkerName()`
`boolean` `idInUse(java.lang.String id)`
`void` `invalidateAll(java.lang.String id)` Call `HttpSession.invalidate()` on all known sessions for the given id.
`java.lang.String` `newSessionId(HttpServletRequest request, long created)`
`void` `removeSession(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(java.lang.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(HttpSession session)

  Add a session to the list of known sessions for a given ID.

  Parameters:
    `session` - The session

### removeSession

    void removeSession(HttpSession session)

  Remove session from the list of known sessions for a given ID.

  Parameters:
    `session` -

### invalidateAll

    void invalidateAll(java.lang.String id)

  Call `HttpSession.invalidate()` on all known sessions for the given id.

  Parameters:
    `id` - The session ID without any cluster node extension

### newSessionId

    java.lang.String newSessionId(HttpServletRequest request,
                                  long created)

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

### getWorkerName

    java.lang.String getWorkerName()

### getClusterId

    java.lang.String getClusterId(java.lang.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

    java.lang.String getNodeId(java.lang.String clusterId,
                               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-2010 Mort Bay Consulting. All Rights Reserved.