Class AuthenticatedClientSessionUpdater

java.lang.Object
org.keycloak.models.sessions.infinispan.changes.remote.updater.BaseUpdater<ClientSessionKey,RemoteAuthenticatedClientSessionEntity>
org.keycloak.models.sessions.infinispan.changes.remote.updater.client.AuthenticatedClientSessionUpdater
All Implemented Interfaces:
BiFunction<ClientSessionKey,RemoteAuthenticatedClientSessionEntity,RemoteAuthenticatedClientSessionEntity>, org.keycloak.models.AuthenticatedClientSessionModel, Updater<ClientSessionKey,RemoteAuthenticatedClientSessionEntity>, org.keycloak.sessions.CommonClientSessionModel

public class AuthenticatedClientSessionUpdater extends BaseUpdater<ClientSessionKey,RemoteAuthenticatedClientSessionEntity> implements org.keycloak.models.AuthenticatedClientSessionModel
An Updater implementation that keeps track of AuthenticatedClientSessionModel changes.
  • Method Details

    • onlineFactory

      Returns:
      The UpdaterFactory implementation to create online session instances of AuthenticatedClientSessionUpdater.
    • offlineFactory

      Returns:
      The UpdaterFactory implementation to create offline session instances of AuthenticatedClientSessionUpdater.
    • apply

      Specified by:
      apply in interface BiFunction<ClientSessionKey,RemoteAuthenticatedClientSessionEntity,RemoteAuthenticatedClientSessionEntity>
    • computeExpiration

      public Expiration computeExpiration()
      Description copied from interface: Updater
      Computes the expiration data for Infinispan cache.
      Specified by:
      computeExpiration in interface Updater<ClientSessionKey,RemoteAuthenticatedClientSessionEntity>
      Returns:
      The Expiration data.
    • getId

      public String getId()
      Specified by:
      getId in interface org.keycloak.models.AuthenticatedClientSessionModel
    • getStarted

      public int getStarted()
      Specified by:
      getStarted in interface org.keycloak.models.AuthenticatedClientSessionModel
    • getUserSessionStarted

      public int getUserSessionStarted()
      Specified by:
      getUserSessionStarted in interface org.keycloak.models.AuthenticatedClientSessionModel
    • isUserSessionRememberMe

      public boolean isUserSessionRememberMe()
      Specified by:
      isUserSessionRememberMe in interface org.keycloak.models.AuthenticatedClientSessionModel
    • getTimestamp

      public int getTimestamp()
      Specified by:
      getTimestamp in interface org.keycloak.models.AuthenticatedClientSessionModel
    • setTimestamp

      public void setTimestamp(int timestamp)
      Specified by:
      setTimestamp in interface org.keycloak.models.AuthenticatedClientSessionModel
    • detachFromUserSession

      public void detachFromUserSession()
      Specified by:
      detachFromUserSession in interface org.keycloak.models.AuthenticatedClientSessionModel
    • getUserSession

      public org.keycloak.models.UserSessionModel getUserSession()
      Specified by:
      getUserSession in interface org.keycloak.models.AuthenticatedClientSessionModel
    • getNote

      public String getNote(String name)
      Specified by:
      getNote in interface org.keycloak.models.AuthenticatedClientSessionModel
    • setNote

      public void setNote(String name, String value)
      Specified by:
      setNote in interface org.keycloak.models.AuthenticatedClientSessionModel
    • removeNote

      public void removeNote(String name)
      Specified by:
      removeNote in interface org.keycloak.models.AuthenticatedClientSessionModel
    • getNotes

      public Map<String,String> getNotes()
      Specified by:
      getNotes in interface org.keycloak.models.AuthenticatedClientSessionModel
    • getRedirectUri

      public String getRedirectUri()
      Specified by:
      getRedirectUri in interface org.keycloak.sessions.CommonClientSessionModel
    • setRedirectUri

      public void setRedirectUri(String uri)
      Specified by:
      setRedirectUri in interface org.keycloak.sessions.CommonClientSessionModel
    • getRealm

      public org.keycloak.models.RealmModel getRealm()
      Specified by:
      getRealm in interface org.keycloak.sessions.CommonClientSessionModel
    • getClient

      public org.keycloak.models.ClientModel getClient()
      Specified by:
      getClient in interface org.keycloak.sessions.CommonClientSessionModel
    • getAction

      public String getAction()
      Specified by:
      getAction in interface org.keycloak.sessions.CommonClientSessionModel
    • setAction

      public void setAction(String action)
      Specified by:
      setAction in interface org.keycloak.sessions.CommonClientSessionModel
    • getProtocol

      public String getProtocol()
      Specified by:
      getProtocol in interface org.keycloak.sessions.CommonClientSessionModel
    • setProtocol

      public void setProtocol(String method)
      Specified by:
      setProtocol in interface org.keycloak.sessions.CommonClientSessionModel
    • restartClientSession

      public void restartClientSession()
      Specified by:
      restartClientSession in interface org.keycloak.models.AuthenticatedClientSessionModel
    • isTransient

      public boolean isTransient()
      Specified by:
      isTransient in interface Updater<ClientSessionKey,RemoteAuthenticatedClientSessionEntity>
      Overrides:
      isTransient in class BaseUpdater<ClientSessionKey,RemoteAuthenticatedClientSessionEntity>
      Returns:
      true if the entity is transient and shouldn't be stored in the Infinispan cache.
    • isUnchanged

      protected boolean isUnchanged()
      Specified by:
      isUnchanged in class BaseUpdater<ClientSessionKey,RemoteAuthenticatedClientSessionEntity>
      Returns:
      true if the entity was changed after being created/read.
    • initialize

      public void initialize(org.keycloak.models.UserSessionModel userSession, org.keycloak.models.ClientModel client, ClientSessionChangeLogTransaction clientTransaction)
      Initializes this class with references to other models classes.
      Parameters:
      userSession - The UserSessionModel associated with this client session.
      client - The ClientModel associated with this client session.
      clientTransaction - The ClientSessionChangeLogTransaction to perform the changes in this class into the RemoteCache.
    • isInitialized

      public boolean isInitialized()
      Returns:
      true if it is already initialized.