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.
    • 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(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!
      Parameters:
      configurationName - name of the configuration to load or null when you want to load all configurations
      See Also:
    • retrieveAllConfigNames

      protected Map<String,Class<? extends IConfigurationClassLoader>> retrieveAllConfigNames()
      Helper method to create stubbed configurations used in JunitTests
    • log

      public void log(String message, MessageKeeper.MessageKeeperLevel level, Exception e)
    • getApplicationName

      public String getApplicationName()
    • isLoadingConfigs

      public boolean isLoadingConfigs()
    • getIbisManager

      public IbisManager getIbisManager()