Package org.frankframework.configuration
Class IbisContext
java.lang.Object
org.frankframework.lifecycle.IbisApplicationContext
org.frankframework.configuration.IbisContext
- All Implemented Interfaces:
Closeable
,AutoCloseable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.frankframework.lifecycle.IbisApplicationContext
IbisApplicationContext.BootState
-
Field Summary
Fields inherited from class org.frankframework.lifecycle.IbisApplicationContext
APP_CONSTANTS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Shuts down the IbisContext, and therefore the Spring contextvoid
Completely rebuilds the ibisContext and therefore also the Spring contextvoid
init()
Creates the Spring context, and load the configuration.void
init
(boolean reconnect) Creates the Spring context, and load the configuration.boolean
void
Loads, digests and starts the specified configuration, or all configurations Does not check if the configuration already exists.void
log
(String message, MessageKeeper.MessageKeeperLevel level, Exception e) void
Reloads the given configuration.protected Map<String,
Class<? extends IConfigurationClassLoader>> Helper method to create stubbed configurations used in JunitTestsvoid
Be aware that the configuration may be unloaded but it's resources wont!Methods inherited from class org.frankframework.lifecycle.IbisApplicationContext
createApplicationContext, createBeanAutowireByName, getApplicationContext, getBean, getBootState, getSpringConfigurationFiles, setParentContext
-
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. -
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 interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classIbisApplicationContext
- See Also:
-
reload
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
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! Usereload(String)
where possible. -
fullReload
public void fullReload()Completely rebuilds the ibisContext and therefore also the Spring context -
load
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:
-
ClassLoaderManager.get(String)
ConfigurationUtils.retrieveAllConfigNames(ApplicationContext)
createAndConfigureConfigurationWithClassLoader(ClassLoader, String, ClassLoaderException)
-
retrieveAllConfigNames
Helper method to create stubbed configurations used in JunitTests -
log
-
getApplicationName
-
isLoadingConfigs
public boolean isLoadingConfigs() -
getIbisManager
-