org.keycloak.adapters.undertow

## Class UndertowUserSessionManagement

- java.lang.Object
- - org.keycloak.adapters.undertow.UndertowUserSessionManagement

- All Implemented Interfaces:
    io.undertow.server.session.SessionListener

      public class UndertowUserSessionManagement
      extends Object
      implements io.undertow.server.session.SessionListener

  Manages relationship to users and sessions so that forced admin logout can be implemented
  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface io.undertow.server.session.SessionListener

      `io.undertow.server.session.SessionListener.SessionDestroyedReason`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `registered`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UndertowUserSessionManagement()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `attributeAdded(io.undertow.server.session.Session session, String name, Object value)`
    `void` | `attributeRemoved(io.undertow.server.session.Session session, String name, Object oldValue)`
    `void` | `attributeUpdated(io.undertow.server.session.Session session, String name, Object newValue, Object oldValue)`
    `protected io.undertow.server.session.Session` | `getSessionById(io.undertow.server.session.SessionManager manager, String sessionId)`
    `void` | `login(io.undertow.server.session.SessionManager manager)`
    `void` | `logoutAll(io.undertow.server.session.SessionManager manager)`
    `void` | `logoutHttpSessions(io.undertow.server.session.SessionManager manager, List<String> sessionIds)`
    `protected void` | `logoutSession(io.undertow.server.session.SessionManager manager, String httpSessionId)`
    `void` | `sessionCreated(io.undertow.server.session.Session session, io.undertow.server.HttpServerExchange exchange)`
    `void` | `sessionDestroyed(io.undertow.server.session.Session session, io.undertow.server.HttpServerExchange exchange, io.undertow.server.session.SessionListener.SessionDestroyedReason reason)`
    `void` | `sessionIdChanged(io.undertow.server.session.Session session, String oldSessionId)`

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

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

- - ### Field Detail

    - #### registered

          protected volatile boolean registered

  - ### Constructor Detail

    - #### UndertowUserSessionManagement

          public UndertowUserSessionManagement()

  - ### Method Detail

    - #### login

          public void login(io.undertow.server.session.SessionManager manager)

    - #### logoutAll

          public void logoutAll(io.undertow.server.session.SessionManager manager)

    - #### logoutHttpSessions

          public void logoutHttpSessions(io.undertow.server.session.SessionManager manager,
                                List<String> sessionIds)

    - #### logoutSession

          protected void logoutSession(io.undertow.server.session.SessionManager manager,
                           String httpSessionId)

    - #### getSessionById

          protected io.undertow.server.session.Session getSessionById(io.undertow.server.session.SessionManager manager,
                                                          String sessionId)

    - #### sessionCreated

          public void sessionCreated(io.undertow.server.session.Session session,
                            io.undertow.server.HttpServerExchange exchange)

      Specified by:
        `sessionCreated` in interface `io.undertow.server.session.SessionListener`

    - #### sessionDestroyed

          public void sessionDestroyed(io.undertow.server.session.Session session,
                              io.undertow.server.HttpServerExchange exchange,
                              io.undertow.server.session.SessionListener.SessionDestroyedReason reason)

      Specified by:
        `sessionDestroyed` in interface `io.undertow.server.session.SessionListener`

    - #### sessionIdChanged

          public void sessionIdChanged(io.undertow.server.session.Session session,
                              String oldSessionId)

      Specified by:
        `sessionIdChanged` in interface `io.undertow.server.session.SessionListener`

    - #### attributeAdded

          public void attributeAdded(io.undertow.server.session.Session session,
                            String name,
                            Object value)

      Specified by:
        `attributeAdded` in interface `io.undertow.server.session.SessionListener`

    - #### attributeUpdated

          public void attributeUpdated(io.undertow.server.session.Session session,
                              String name,
                              Object newValue,
                              Object oldValue)

      Specified by:
        `attributeUpdated` in interface `io.undertow.server.session.SessionListener`

    - #### attributeRemoved

          public void attributeRemoved(io.undertow.server.session.Session session,
                              String name,
                              Object oldValue)

      Specified by:
        `attributeRemoved` in interface `io.undertow.server.session.SessionListener`

Copyright © 2015. All Rights Reserved.