Class DefaultCacheEmbeddedConfigProviderFactory
java.lang.Object
org.keycloak.spi.infinispan.impl.embedded.DefaultCacheEmbeddedConfigProviderFactory
- All Implemented Interfaces:
Provider
,ProviderFactory<CacheEmbeddedConfigProvider>
,CacheEmbeddedConfigProvider
,CacheEmbeddedConfigProviderFactory
public class DefaultCacheEmbeddedConfigProviderFactory
extends Object
implements CacheEmbeddedConfigProviderFactory, CacheEmbeddedConfigProvider
The default implementation of
CacheEmbeddedConfigProviderFactory
.
It builds a ConfigurationBuilderHolder
based on the Keycloak configuration.
Advanced users may extend this class and overwrite the method createConfiguration(KeycloakSessionFactory)
.
They have access to the ConfigurationBuilderHolder
, and they can modify it as needed for their custom
providers.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
This is called when the server shuts down.org.infinispan.configuration.parsing.ConfigurationBuilderHolder
TheConfigurationBuilderHolder
whit theEmbeddedCacheManager
configuration.create
(KeycloakSession session) protected org.infinispan.configuration.parsing.ConfigurationBuilderHolder
Optional method used to declare that a ProviderFactory has a dependency on one or more Providers.Returns the metadata for each configuration property supported by this factory.getId()
void
init
(Config.Scope config) Only called once when the factory is first created.void
postInit
(KeycloakSessionFactory factory) Called after all provider factories have been initializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.keycloak.provider.ProviderFactory
order
-
Field Details
-
PROVIDER_ID
- See Also:
-
CONFIG
- See Also:
-
STACK
- See Also:
-
NODE_NAME
- See Also:
-
SITE_NAME
- See Also:
-
-
Constructor Details
-
DefaultCacheEmbeddedConfigProviderFactory
public DefaultCacheEmbeddedConfigProviderFactory()
-
-
Method Details
-
create
- Specified by:
create
in interfaceProviderFactory<CacheEmbeddedConfigProvider>
-
init
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 interfaceProviderFactory<CacheEmbeddedConfigProvider>
-
postInit
Description copied from interface:ProviderFactory
Called after all provider factories have been initialized- Specified by:
postInit
in interfaceProviderFactory<CacheEmbeddedConfigProvider>
-
configuration
public org.infinispan.configuration.parsing.ConfigurationBuilderHolder configuration()Description copied from interface:CacheEmbeddedConfigProvider
TheConfigurationBuilderHolder
whit theEmbeddedCacheManager
configuration. It must not benull
.- Specified by:
configuration
in interfaceCacheEmbeddedConfigProvider
- Returns:
- The
ConfigurationBuilderHolder
whit theEmbeddedCacheManager
configuration.
-
close
public void close()Description copied from interface:ProviderFactory
This is called when the server shuts down.- Specified by:
close
in interfaceCacheEmbeddedConfigProvider
- Specified by:
close
in interfaceProvider
- Specified by:
close
in interfaceProviderFactory<CacheEmbeddedConfigProvider>
-
getId
- Specified by:
getId
in interfaceProviderFactory<CacheEmbeddedConfigProvider>
-
getConfigMetadata
Description copied from interface:ProviderFactory
Returns the metadata for each configuration property supported by this factory.- Specified by:
getConfigMetadata
in interfaceProviderFactory<CacheEmbeddedConfigProvider>
- Returns:
- a list with the metadata for each configuration property supported by this factory
-
dependsOn
Description copied from interface:ProviderFactory
Optional method used to declare that a ProviderFactory has a dependency on one or more Providers. If a Provider is declared here, it is guaranteed that the dependenciesProviderFactory.postInit(org.keycloak.models.KeycloakSessionFactory)
method will be executed before this ProviderFactory'sProviderFactory.postInit(org.keycloak.models.KeycloakSessionFactory)
. Similarly, it's guaranteed thatProviderFactory.close()
will be called on thisProviderFactory
beforeProviderFactory.close()
is called on any of the dependent ProviderFactory implementations.- Specified by:
dependsOn
in interfaceProviderFactory<CacheEmbeddedConfigProvider>
-
createConfiguration
protected org.infinispan.configuration.parsing.ConfigurationBuilderHolder createConfiguration(KeycloakSessionFactory factory) throws IOException - Throws:
IOException
-