Package se.swedenconnect.opensaml
Class OpenSAMLInitializer
java.lang.Object
se.swedenconnect.opensaml.OpenSAMLInitializer
Singleton class for initialization and configuration of the OpenSAML library.
- Author:
- Martin Lindström (martin@idsec.se)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ParserPool
Creates a basic parser pool with default settings.static OpenSAMLInitializer
Returns the initializer instance.final void
initialize
(OpenSAMLInitializerConfig... customConfigs) Initializes the OpenSAML library.boolean
Predicate that tells if the OpenSAML library already has been initialized.void
setParserPool
(ParserPool parserPool) Set the global ParserPool to configure.
-
Constructor Details
-
OpenSAMLInitializer
protected OpenSAMLInitializer()
-
-
Method Details
-
getInstance
Returns the initializer instance.- Returns:
- the initializer instance
-
isInitialized
public boolean isInitialized()Predicate that tells if the OpenSAML library already has been initialized.- Returns:
- if the library has been initialized true is returned, otherwise false
-
initialize
Initializes the OpenSAML library.The
OpenSAMLInitializerConfig.preInitialize()
for all suppliedcustomConfigs
are called in order before OpenSAML is initialized (InitializationService.initialize()
. After OpenSAML has been initialized, allOpenSAMLInitializerConfig.postInitialize()
methods are invoked.- Parameters:
customConfigs
- custom configuration of OpenSAML- Throws:
Exception
- thrown if there is a problem initializing the library
-
createDefaultParserPool
Creates a basic parser pool with default settings.- Returns:
- the default parser pool
- Throws:
ComponentInitializationException
- for init errors
-