Package org.keycloak.services
Class DefaultKeycloakSessionFactory
java.lang.Object
org.keycloak.services.DefaultKeycloakSessionFactory
- All Implemented Interfaces:
KeycloakSessionFactory
,InvalidationHandler
,ProviderEventManager
,ProviderManagerDeployer
public abstract class DefaultKeycloakSessionFactory
extends Object
implements KeycloakSessionFactory, ProviderManagerDeployer
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.provider.InvalidationHandler
InvalidationHandler.InvalidableObjectType, InvalidationHandler.ObjectType
-
Field Summary
Modifier and TypeFieldDescriptionprotected ComponentFactoryProviderFactory
protected CopyOnWriteArrayList<ProviderEventListener>
protected long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
close()
void
long
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
long
getSpis()
protected DefaultThemeManagerFactory
void
init()
void
invalidate
(KeycloakSession session, InvalidationHandler.InvalidableObjectType type, Object... ids) Invalidates intermediate states of the given objectsprotected boolean
isEnabled
(ProviderFactory factory, Config.Scope scope) static boolean
isInternal
(ProviderFactory<?> factory) void
publish
(ProviderEvent event) void
register
(ProviderEventListener listener) static String
resolveDefaultProvider
(Map<String, ProviderFactory> factories, Spi spi) void
void
unregister
(ProviderEventListener listener) protected void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.keycloak.models.KeycloakSessionFactory
create
-
Field Details
-
spis
-
provider
-
factoriesMap
-
listeners
-
serverStartupTimestamp
protected long serverStartupTimestamp -
componentFactoryPF
-
-
Constructor Details
-
DefaultKeycloakSessionFactory
public DefaultKeycloakSessionFactory()
-
-
Method Details
-
register
- Specified by:
register
in interfaceProviderEventManager
-
unregister
- Specified by:
unregister
in interfaceProviderEventManager
-
publish
- Specified by:
publish
in interfaceProviderEventManager
-
init
public void init() -
getFactoriesCopy
-
deploy
- Specified by:
deploy
in interfaceProviderManagerDeployer
-
undeploy
- Specified by:
undeploy
in interfaceProviderManagerDeployer
-
getThemeManagerFactory
-
checkProvider
protected void checkProvider() -
resolveDefaultProvider
-
loadFactories
protected Map<Class<? extends Provider>,Map<String, loadFactoriesProviderFactory>> (ProviderManager pm) -
isEnabled
-
getSpis
- Specified by:
getSpis
in interfaceKeycloakSessionFactory
-
getSpi
- Specified by:
getSpi
in interfaceKeycloakSessionFactory
-
getProviderFactory
- Specified by:
getProviderFactory
in interfaceKeycloakSessionFactory
-
getProviderFactory
- Specified by:
getProviderFactory
in interfaceKeycloakSessionFactory
-
getProviderFactory
public <T extends Provider> ProviderFactory<T> getProviderFactory(Class<T> clazz, String realmId, String componentId, Function<KeycloakSessionFactory, ComponentModel> modelGetter) - Specified by:
getProviderFactory
in interfaceKeycloakSessionFactory
-
invalidate
public void invalidate(KeycloakSession session, InvalidationHandler.InvalidableObjectType type, Object... ids) Description copied from interface:InvalidationHandler
Invalidates intermediate states of the given objects- Specified by:
invalidate
in interfaceInvalidationHandler
- Parameters:
session
- KeycloakSessiontype
- Type of the objects to invalidateids
- Parameters used for the invalidation
-
getProviderFactoriesStream
Description copied from interface:KeycloakSessionFactory
Returns stream of provider factories for the given provider.- Specified by:
getProviderFactoriesStream
in interfaceKeycloakSessionFactory
- Parameters:
clazz
-Class<? extends Provider>
- Returns:
Stream<ProviderFactory>
Stream of provider factories. Never returnsnull
.
-
close
public void close()- Specified by:
close
in interfaceKeycloakSessionFactory
-
isInternal
-
getClientStorageProviderTimeout
public long getClientStorageProviderTimeout() -
getRoleStorageProviderTimeout
public long getRoleStorageProviderTimeout() -
getServerStartupTimestamp
public long getServerStartupTimestamp()- Specified by:
getServerStartupTimestamp
in interfaceKeycloakSessionFactory
- Returns:
- timestamp of Keycloak server startup
-
updateComponentFactoryProviderFactory
protected void updateComponentFactoryProviderFactory()
-