org.keycloak.models.session

## Class PersistentUserSessionAdapter

- java.lang.Object
- - org.keycloak.models.session.PersistentUserSessionAdapter

- All Implemented Interfaces:
    UserSessionModel

      public class PersistentUserSessionAdapter
      extends Object
      implements UserSessionModel

  Author:
    Marek Posolda

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `PersistentUserSessionAdapter.PersistentUserSessionData`

    - ### Nested classes/interfaces inherited from interface org.keycloak.models.UserSessionModel

      `UserSessionModel.State`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PersistentUserSessionAdapter(PersistentUserSessionModel model, RealmModel realm, UserModel user, List<ClientSessionModel> clientSessions)`
    `PersistentUserSessionAdapter(UserSessionModel other)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `String` | `getAuthMethod()`
    `String` | `getBrokerSessionId()` If created via a broker external login, this is an identifier that can be used to match external broker backchannel logout requests to a UserSession
    `String` | `getBrokerUserId()`
    `List<ClientSessionModel>` | `getClientSessions()`
    `String` | `getId()`
    `String` | `getIpAddress()`
    `int` | `getLastSessionRefresh()`
    `String` | `getLoginUsername()`
    `String` | `getNote(String name)`
    `Map<String,String>` | `getNotes()`
    `RealmModel` | `getRealm()`
    `int` | `getStarted()`
    `UserSessionModel.State` | `getState()`
    `PersistentUserSessionModel` | `getUpdatedModel()`
    `UserModel` | `getUser()`
    `int` | `hashCode()`
    `boolean` | `isRememberMe()`
    `void` | `removeNote(String name)`
    `void` | `setLastSessionRefresh(int seconds)`
    `void` | `setNote(String name, String value)`
    `void` | `setState(UserSessionModel.State state)`

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

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

- - ### Constructor Detail

    - #### PersistentUserSessionAdapter

          public PersistentUserSessionAdapter(UserSessionModel other)

    - #### PersistentUserSessionAdapter

          public PersistentUserSessionAdapter(PersistentUserSessionModel model,
                                              RealmModel realm,
                                              UserModel user,
                                              List<ClientSessionModel> clientSessions)

  - ### Method Detail

    - #### getUpdatedModel

          public PersistentUserSessionModel getUpdatedModel()

    - #### getId

          public String getId()

      Specified by:
        `getId` in interface `UserSessionModel`

    - #### getBrokerSessionId

          public String getBrokerSessionId()

      Description copied from interface: `UserSessionModel`
      If created via a broker external login, this is an identifier that can be used to match external broker backchannel logout requests to a UserSession
      Specified by:
        `getBrokerSessionId` in interface `UserSessionModel`
      Returns:

    - #### getBrokerUserId

          public String getBrokerUserId()

      Specified by:
        `getBrokerUserId` in interface `UserSessionModel`

    - #### getUser

          public UserModel getUser()

      Specified by:
        `getUser` in interface `UserSessionModel`

    - #### getRealm

          public RealmModel getRealm()

      Specified by:
        `getRealm` in interface `UserSessionModel`

    - #### getLoginUsername

          public String getLoginUsername()

      Specified by:
        `getLoginUsername` in interface `UserSessionModel`

    - #### getIpAddress

          public String getIpAddress()

      Specified by:
        `getIpAddress` in interface `UserSessionModel`

    - #### getAuthMethod

          public String getAuthMethod()

      Specified by:
        `getAuthMethod` in interface `UserSessionModel`

    - #### isRememberMe

          public boolean isRememberMe()

      Specified by:
        `isRememberMe` in interface `UserSessionModel`

    - #### getStarted

          public int getStarted()

      Specified by:
        `getStarted` in interface `UserSessionModel`

    - #### getLastSessionRefresh

          public int getLastSessionRefresh()

      Specified by:
        `getLastSessionRefresh` in interface `UserSessionModel`

    - #### setLastSessionRefresh

          public void setLastSessionRefresh(int seconds)

      Specified by:
        `setLastSessionRefresh` in interface `UserSessionModel`

    - #### getClientSessions

          public List<ClientSessionModel> getClientSessions()

      Specified by:
        `getClientSessions` in interface `UserSessionModel`

    - #### getNote

          public String getNote(String name)

      Specified by:
        `getNote` in interface `UserSessionModel`

    - #### setNote

          public void setNote(String name,
                              String value)

      Specified by:
        `setNote` in interface `UserSessionModel`

    - #### removeNote

          public void removeNote(String name)

      Specified by:
        `removeNote` in interface `UserSessionModel`

    - #### getNotes

          public Map<String,String> getNotes()

      Specified by:
        `getNotes` in interface `UserSessionModel`

    - #### getState

          public UserSessionModel.State getState()

      Specified by:
        `getState` in interface `UserSessionModel`

    - #### setState

          public void setState(UserSessionModel.State state)

      Specified by:
        `setState` in interface `UserSessionModel`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2016 JBoss by Red Hat. All rights reserved.