Class OpenSAMLInitializer

java.lang.Object
se.swedenconnect.opensaml.OpenSAMLInitializer

public class OpenSAMLInitializer extends Object
Singleton class for initialization and configuration of the OpenSAML library.
Author:
Martin Lindström (martin@idsec.se)
  • Constructor Details

    • OpenSAMLInitializer

      protected OpenSAMLInitializer()
  • Method Details

    • getInstance

      public static OpenSAMLInitializer 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

      public final void initialize(OpenSAMLInitializerConfig... customConfigs) throws Exception
      Initializes the OpenSAML library.

      The OpenSAMLInitializerConfig.preInitialize() for all supplied customConfigs are called in order before OpenSAML is initialized (InitializationService.initialize(). After OpenSAML has been initialized, all OpenSAMLInitializerConfig.postInitialize() methods are invoked.

      Parameters:
      customConfigs - custom configuration of OpenSAML
      Throws:
      Exception - thrown if there is a problem initializing the library
    • setParserPool

      public void setParserPool(net.shibboleth.shared.xml.ParserPool parserPool)
      Set the global ParserPool to configure.
      Parameters:
      parserPool - the parserPool to assign
    • createDefaultParserPool

      public static net.shibboleth.shared.xml.ParserPool createDefaultParserPool() throws net.shibboleth.shared.component.ComponentInitializationException
      Creates a basic parser pool with default settings.
      Returns:
      the default parser pool
      Throws:
      net.shibboleth.shared.component.ComponentInitializationException - for init errors