Package org.keycloak.services
Class DefaultKeycloakSessionFactory
java.lang.Object
org.keycloak.services.DefaultKeycloakSessionFactory
- All Implemented Interfaces:
KeycloakSessionFactory
,InvalidationHandler
,ProviderEventManager
,ProviderManagerDeployer
public 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()
create()
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) void
void
unregister
(ProviderEventListener listener) protected void
-
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() -
loadFactories
protected Map<Class<? extends Provider>,Map<String, loadFactoriesProviderFactory>> (ProviderManager pm) -
isEnabled
-
create
- Specified by:
create
in interfaceKeycloakSessionFactory
-
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()
-