org.keycloak.models.map.userSession

## Class MapUserSessionProviderFactory<UK,CK>

- java.lang.Object
- - org.keycloak.models.map.userSession.MapUserSessionProviderFactory<UK,CK>

- All Implemented Interfaces:
    AmphibianProviderFactory<UserSessionProvider>, ComponentFactory<UserSessionProvider,UserSessionProvider>, UserSessionProviderFactory, ConfiguredProvider, EnvironmentDependentProviderFactory, ProviderEventListener, ProviderFactory<UserSessionProvider>

      public class MapUserSessionProviderFactory<UK,CK>
      extends Object
      implements AmphibianProviderFactory<UserSessionProvider>, UserSessionProviderFactory, ProviderEventListener, EnvironmentDependentProviderFactory

  Author:
    Martin Kanis

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `CONFIG_STORAGE_CLIENT_SESSIONS`
    `static String` | `CONFIG_STORAGE_USER_SESSIONS`
    `static String` | `PROVIDER_ID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MapUserSessionProviderFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` This is called when the server shuts down.
    `MapUserSessionProvider` | `create(KeycloakSession session)`
    `String` | `getHelpText()`
    `String` | `getId()`
    `void` | `init(Config.Scope config)` Only called once when the factory is first created.
    `boolean` | `isSupported()`
    `void` | `loadPersistentSessions(KeycloakSessionFactory sessionFactory, int maxErrors, int sessionsPerSegment)`
    `void` | `onEvent(ProviderEvent event)`
    `void` | `postInit(KeycloakSessionFactory factory)` Called after all provider factories have been initialized

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

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

    - ### Methods inherited from interface org.keycloak.component.AmphibianProviderFactory

      `create, getConfigProperties, onUpdate, preRemove`

    - ### Methods inherited from interface org.keycloak.component.ComponentFactory

      `getCommonProviderConfigProperties, getTypeMetadata, onCreate, validateConfiguration`

    - ### Methods inherited from interface org.keycloak.provider.ProviderFactory

      `order`

- - ### Field Detail

    - #### CONFIG_STORAGE_USER_SESSIONS

          public static final String CONFIG_STORAGE_USER_SESSIONS

      See Also:
        Constant Field Values

    - #### CONFIG_STORAGE_CLIENT_SESSIONS

          public static final String CONFIG_STORAGE_CLIENT_SESSIONS

      See Also:
        Constant Field Values

    - #### PROVIDER_ID

          public static final String PROVIDER_ID

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MapUserSessionProviderFactory

          public MapUserSessionProviderFactory()

  - ### Method Detail

    - #### getId

          public String getId()

      Specified by:
        `getId` in interface `ProviderFactory<UserSessionProvider>`

    - #### init

          public void init(Config.Scope config)

      Description copied from interface: `ProviderFactory`
      Only called once when the factory is first created. This config is pulled from keycloak_server.json
      Specified by:
        `init` in interface `ProviderFactory<UserSessionProvider>`

    - #### postInit

          public void postInit(KeycloakSessionFactory factory)

      Description copied from interface: `ProviderFactory`
      Called after all provider factories have been initialized
      Specified by:
        `postInit` in interface `ProviderFactory<UserSessionProvider>`

    - #### close

          public void close()

      Description copied from interface: `ProviderFactory`
      This is called when the server shuts down.
      Specified by:
        `close` in interface `AmphibianProviderFactory<UserSessionProvider>`
      Specified by:
        `close` in interface `ProviderFactory<UserSessionProvider>`

    - #### loadPersistentSessions

          public void loadPersistentSessions(KeycloakSessionFactory sessionFactory,
                                             int maxErrors,
                                             int sessionsPerSegment)

      Specified by:
        `loadPersistentSessions` in interface `UserSessionProviderFactory`

    - #### create

          public MapUserSessionProvider create(KeycloakSession session)

      Specified by:
        `create` in interface `AmphibianProviderFactory<UserSessionProvider>`
      Specified by:
        `create` in interface `ComponentFactory<UserSessionProvider,UserSessionProvider>`
      Specified by:
        `create` in interface `ProviderFactory<UserSessionProvider>`

    - #### getHelpText

          public String getHelpText()

      Specified by:
        `getHelpText` in interface `ConfiguredProvider`

    - #### onEvent

          public void onEvent(ProviderEvent event)

      Specified by:
        `onEvent` in interface `ProviderEventListener`

    - #### isSupported

          public boolean isSupported()

      Specified by:
        `isSupported` in interface `EnvironmentDependentProviderFactory`
      Returns:
        `true` if the provider is supported and should be available, `false` otherwise

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