Class IbisContext

java.lang.Object
org.frankframework.lifecycle.IbisApplicationContext
org.frankframework.configuration.IbisContext
All Implemented Interfaces:
Closeable, AutoCloseable

public class IbisContext extends IbisApplicationContext
Main entry point for creating and starting Ibis instances from the configuration file. This class can not be created from the Spring context, because it is the place where the Spring context is created.
Since:
4.8
Author:
Tim van der Leeuw, Jaco de Groot
  • Constructor Details

    • IbisContext

      public IbisContext()
  • Method Details

    • init

      public void init()
      Creates the Spring context, and load the configuration. Optionally with a specific ClassLoader which might for example override the getResource method to load configuration and related resources from a different location from the standard classpath.
      See Also:
    • init

      public void init(boolean reconnect)
      Creates the Spring context, and load the configuration. Optionally with a specific ClassLoader which might for example override the getResource method to load configuration and related resources from a different location from the standard classpath.
      Parameters:
      reconnect - retry startup when failures occur
      Throws:
      org.springframework.beans.factory.BeanCreationException - when Spring can't start up
      See Also:
    • close

      public void close()
      Shuts down the IbisContext, and therefore the Spring context
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class IbisApplicationContext
      See Also:
    • reload

      public void reload(String configurationName)
      Reloads the given configuration. First it checks if the resources can be found. It then replaces the old resources with the new resources. If all is successful it will unload the old configuration from the IbisManager, and load the new configuration. This also destroys the ClassLoader and creates a new one.
    • unload

      public void unload(String configurationName)
      Be aware that the configuration may be unloaded but it's resources wont! There is currently no way to cleanup old ClassLoaders, these are kept in memory. Removing the ClassLoader will cause a ClassLoader-leak, leaving a small footprint behind in memory! Use reload(String) where possible.
    • fullReload

      public void fullReload()
      Completely rebuilds the ibisContext and therefore also the Spring context
      See Also:
    • load

      public void load(@NonNull String configurationName)
      Loads, digests and starts the specified configuration, or all configurations Does not check if the configuration already exists. Does not unload old configurations! Does not load parent-configuration if the configuration has a parent which is not loaded, because such side-effects would be undesirable here.
      Parameters:
      configurationName - name of the configuration to load
      See Also:
    • retrieveAllConfigNames

      protected Map<String, Class<? extends ClassLoader>> retrieveAllConfigNames()
      Helper method get the names of all configurations, overridden in JUnit tests to create stubbed configurations. Configuration names are sorted parent-first.
      See Also:
    • getParentConfigName

      public static Optional<@NonNull String> getParentConfigName(@NonNull String configurationName)
      Get the name of the parent configuration
      Parameters:
      configurationName - Name of configuration for which to find parent configuration name
      Returns:
      Name of parent configuration, or null
    • log

      public void log(String message, MessageEventLevel level, Exception e)
    • getApplicationName

      public String getApplicationName()
    • isLoadingConfigs

      public boolean isLoadingConfigs()