Class ApplicationConfigurationBinder

java.lang.Object
org.gcube.smartgears.configuration.application.ApplicationConfigurationBinder

public class ApplicationConfigurationBinder extends Object
Binds ApplicationConfigurations to and from XML serialisations.
Author:
Fabio Simeoni, Luca Frosini (ISTI-CNR)
  • Constructor Details

    • ApplicationConfigurationBinder

      public ApplicationConfigurationBinder()
  • Method Details

    • load

      public ApplicationConfiguration load(InputStream stream)
      Returns the application configuration from its XML serialisation.
      Parameters:
      stream - the serialisation
      Returns:
      the configuration
      Throws:
      RuntimeException - if the serialisation is invalid
    • bindHandlers

      public ApplicationHandlers bindHandlers(ClassLoader classLoader)
      Returns the handlers of the application.
      Parameters:
      classLoader - the class loader to use for loading handler classes
      Returns:
      the handlers
      Throws:
      RuntimeException - if the handlers cannot be loaded
    • scanForApplicationHandlers

      public void scanForApplicationHandlers(ClassLoader currentClassLoader)
      Scans for application handlers in the given class loader.
      Parameters:
      currentClassLoader - the class loader to scan for handlers