Package org.keycloak.platform
Interface PlatformProvider
-
public interface PlatformProvider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
exit(Throwable cause)
ClassLoader
getScriptEngineClassLoader(Config.Scope scriptProviderConfig)
Returns classloader to load script engine.File
getTmpDirectory()
String
name()
void
onShutdown(Runnable runnable)
void
onStartup(Runnable runnable)
-
-
-
Method Detail
-
name
String name()
-
onStartup
void onStartup(Runnable runnable)
-
onShutdown
void onShutdown(Runnable runnable)
-
exit
void exit(Throwable cause)
-
getTmpDirectory
File getTmpDirectory()
- Returns:
- tmp directory specific to target platform. Implementation can make sure to create "tmp" directory in case it does not exists. The directory should be usually inside the corresponding server directory. In production, it should not be system directory like "/tmp" .
-
getScriptEngineClassLoader
ClassLoader getScriptEngineClassLoader(Config.Scope scriptProviderConfig)
Returns classloader to load script engine. Classloader should contain the implementation ofScriptEngineFactory
and it's definition inside META-INF/services of the jar file(s), which will be provided by this classloader. This method can return null and in that case, the default Keycloak services classloader will be used for load script engine. Note that java versions earlier than 15 always contain the "nashorn" script engine by default on the classpath (it is part of the Java platform itself) and hence for them it is always fine to return null (unless you want to override default engine)- Parameters:
scriptProviderConfig
- Configuration scope of the "default" provider of "scripting" SPI. It can contain some config properties for the classloader (EG. file path)- Returns:
- classloader or null
-
-