org.keycloak.models

## Interface KeycloakSessionFactory

- All Superinterfaces:
    InvalidationHandler, ProviderEventManager
  All Known Implementing Classes:
    DefaultKeycloakSessionFactory

      public interface KeycloakSessionFactory
      extends ProviderEventManager, InvalidationHandler

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.keycloak.provider.InvalidationHandler

      `InvalidationHandler.InvalidableObjectType, InvalidationHandler.ObjectType`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `KeycloakSession` | `create()`
    `default List<ProviderFactory>` | `getProviderFactories(Class<? extends Provider> clazz)` Deprecated. Use `getProviderFactoriesStream` instead.
    `Stream<ProviderFactory>` | `getProviderFactoriesStream(Class<? extends Provider> clazz)` Returns stream of provider factories for the given provider.
    `<T extends Provider> ProviderFactory<T>` | `getProviderFactory(Class<T> clazz)`
    `<T extends Provider> ProviderFactory<T>` | `getProviderFactory(Class<T> clazz, String id)`
    `<T extends Provider> ProviderFactory<T>` | `getProviderFactory(Class<T> clazz, String realmId, String componentId, Function<KeycloakSessionFactory,ComponentModel> modelGetter)`
    `long` | `getServerStartupTimestamp()`
    `Spi` | `getSpi(Class<? extends Provider> providerClass)`
    `Set<Spi>` | `getSpis()`

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

      `publish, register, unregister`

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

      `invalidate`

- - ### Method Detail

    - #### create

          KeycloakSession create()

    - #### getSpis

          Set<Spi> getSpis()

    - #### getSpi

          Spi getSpi(Class<? extends Provider> providerClass)

    - #### getProviderFactory

          <T extends Provider> ProviderFactory<T> getProviderFactory(Class<T> clazz)

    - #### getProviderFactory

          <T extends Provider> ProviderFactory<T> getProviderFactory(Class<T> clazz,
                                                                     String id)

    - #### getProviderFactory

          <T extends Provider> ProviderFactory<T> getProviderFactory(Class<T> clazz,
                                                                     String realmId,
                                                                     String componentId,
                                                                     Function<KeycloakSessionFactory,ComponentModel> modelGetter)

    - #### getProviderFactories

          @Deprecated
          default List<ProviderFactory> getProviderFactories(Class<? extends Provider> clazz)

      Deprecated. Use `getProviderFactoriesStream` instead.
      Returns list of provider factories for the given provider.
      Parameters:
        `clazz` - `Class<? extends Provider>`
      Returns:
        `List<ProviderFactory>` List of provider factories

    - #### getProviderFactoriesStream

          Stream<ProviderFactory> getProviderFactoriesStream(Class<? extends Provider> clazz)

      Returns stream of provider factories for the given provider.
      Parameters:
        `clazz` - `Class<? extends Provider>`
      Returns:
        `Stream<ProviderFactory>` Stream of provider factories. Never returns `null`.

    - #### getServerStartupTimestamp

          long getServerStartupTimestamp()

    - #### close

          void close()

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