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 net.shibboleth.shared.xml.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
(net.shibboleth.shared.xml.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
public static net.shibboleth.shared.xml.ParserPool createDefaultParserPool() throws net.shibboleth.shared.component.ComponentInitializationExceptionCreates a basic parser pool with default settings.- Returns:
- the default parser pool
- Throws:
net.shibboleth.shared.component.ComponentInitializationException
- for init errors
-