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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ParserPoolCreates a basic parser pool with default settings.static OpenSAMLInitializerReturns the initializer instance.final voidinitialize(OpenSAMLInitializerConfig... customConfigs) Initializes the OpenSAML library.booleanPredicate that tells if the OpenSAML library already has been initialized.voidsetParserPool(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 suppliedcustomConfigsare 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
-