Package org.frankframework.configuration
Class Configuration
java.lang.Object
org.springframework.core.io.DefaultResourceLoader
org.springframework.context.support.AbstractApplicationContext
org.springframework.context.support.AbstractRefreshableApplicationContext
org.springframework.context.support.AbstractRefreshableConfigApplicationContext
org.springframework.context.support.AbstractXmlApplicationContext
org.springframework.context.support.ClassPathXmlApplicationContext
org.frankframework.configuration.Configuration
- All Implemented Interfaces:
Closeable,AutoCloseable,FrankElement,HasApplicationContext,HasName,IConfigurable,IScopeProvider,ConfigurableLifecycle,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactory,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.HierarchicalBeanFactory,org.springframework.beans.factory.InitializingBean,org.springframework.beans.factory.ListableBeanFactory,org.springframework.context.ApplicationContext,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationEventPublisher,org.springframework.context.ConfigurableApplicationContext,org.springframework.context.Lifecycle,org.springframework.context.MessageSource,org.springframework.context.Phased,org.springframework.context.SmartLifecycle,org.springframework.core.env.EnvironmentCapable,org.springframework.core.io.ResourceLoader,org.springframework.core.io.support.ResourcePatternResolver
@FrankDocGroup(OTHER)
public class Configuration
extends org.springframework.context.support.ClassPathXmlApplicationContext
implements ConfigurableLifecycle, FrankElement
Container of
Configurations are shown in the Frank!Console along with their
Adapters that belong together.
A configuration may be deployed independently from other configurations.
Names of nested elements like Adapters, Receivers, listeners and senders
can be reused in other configurations.
Configurations are shown in the Frank!Console along with their
Adapters,
Receivers, listeners and senders. The Adapter Status page of the Frank!Console
has a tab for each configuration that only shows information
about that configuration. See the Frank!Manual for details.- Author:
- Niels Meijer
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.core.io.DefaultResourceLoader
org.springframework.core.io.DefaultResourceLoader.ClassPathContextResource -
Field Summary
FieldsFields inherited from class org.springframework.context.support.AbstractApplicationContext
APPLICATION_EVENT_MULTICASTER_BEAN_NAME, LIFECYCLE_PROCESSOR_BEAN_NAME, logger, MESSAGE_SOURCE_BEAN_NAMEFields inherited from interface org.springframework.beans.factory.BeanFactory
FACTORY_BEAN_PREFIX, FACTORY_BEAN_PREFIX_CHARFields inherited from interface org.springframework.context.ConfigurableApplicationContext
APPLICATION_STARTUP_BEAN_NAME, BOOTSTRAP_EXECUTOR_BEAN_NAME, CONFIG_LOCATION_DELIMITERS, CONVERSION_SERVICE_BEAN_NAME, ENVIRONMENT_BEAN_NAME, LOAD_TIME_WEAVER_BEAN_NAME, SHUTDOWN_HOOK_THREAD_NAME, SYSTEM_ENVIRONMENT_BEAN_NAME, SYSTEM_PROPERTIES_BEAN_NAMEFields inherited from interface org.springframework.core.io.ResourceLoader
CLASSPATH_URL_PREFIXFields inherited from interface org.springframework.core.io.support.ResourcePatternResolver
CLASSPATH_ALL_URL_PREFIXFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdapter(Adapter adapter) Add adapter.voidaddInclude(Include module) Include the referenced Module in this configurationvoidaddJmsRealm(JmsRealm realm) Deprecated.voidaddScheduledJob(IJob jobdef) Deprecated.voidSpring's configure method.voidclose()voidDigest the configuration and generate flow diagram.org.springframework.context.ApplicationContextIf no ClassLoader has been set it tries to fall back on the `configurations.xxx.classLoaderType` property.This ClassLoader is set upon creation of the object, used to retrieve resources configured by the Ibis application.getName()getRegisteredAdapter(String name) Get a registered adapter by its name.getScheduledJob(String name) booleanBy default these beans are not started.booleanbooleanbooleanvoidpublishEvent(org.springframework.context.ApplicationEvent event) voidrefresh()Don't manually call this method.protected voidregisterBeanPostProcessors(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) Enables theAutowiredannotation andConfigurationAwareobjects.voidregisterMonitoring(MonitorManager factory) Deprecated.voidremoveAdapter(Adapter adapter) Remove adapter.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetAutoStart(boolean autoStart) If the Configuration should automatically start allAdaptersandScheduled Jobs.voidsetBeanName(String name) Overwrite the DisplayName created by the super.setBeanName which prepends 'ApplicationContext'.voidsetConfigurationException(ConfigurationException exception) voidsetErrorMessageFormatter(IErrorMessageFormatter errorMessageFormatter) Set the defaultIErrorMessageFormatterfor all adapters in this configuration that do not have anErrorMessageFormatterdefined.voidsetIbisManager(IbisManager ibisManager) voidsetJmsRealms(JmsRealmFactory realm) voidsetLoadedConfiguration(String loadedConfiguration) The loaded (with resolved properties) configurationvoidsetMonitoring(MonitorManager monitorManager) Container for monitor objectsvoidConfigurations should be wired through Spring, which in turn should callsetBeanName(String).voidsetOriginalConfiguration(String originalConfiguration) The entire (raw) configurationvoidsetSapSystems(SapSystems sapSystems) voidsetScheduleManager(ScheduleManager scheduleManager) Container for jobs scheduled for periodic execution.voidsetSharedResources(SharedResources resource) voidsetVersion(String version) The version of the Configuration, typically provided by the BuildInfo.properties file.voidstart()Spring method which starts the ApplicationContext.voidstop()Methods inherited from class org.springframework.context.support.ClassPathXmlApplicationContext
getConfigResourcesMethods inherited from class org.springframework.context.support.AbstractXmlApplicationContext
initBeanDefinitionReader, loadBeanDefinitions, loadBeanDefinitions, setValidatingMethods inherited from class org.springframework.context.support.AbstractRefreshableConfigApplicationContext
getConfigLocations, getDefaultConfigLocations, resolvePath, setConfigLocation, setConfigLocations, setIdMethods inherited from class org.springframework.context.support.AbstractRefreshableApplicationContext
assertBeanFactoryActive, cancelRefresh, closeBeanFactory, createBeanFactory, customizeBeanFactory, getBeanFactory, hasBeanFactory, refreshBeanFactory, setAllowBeanDefinitionOverriding, setAllowCircularReferencesMethods inherited from class org.springframework.context.support.AbstractApplicationContext
addApplicationListener, addBeanFactoryPostProcessor, clearResourceCaches, containsBean, containsBeanDefinition, containsLocalBean, createEnvironment, destroyBeans, doClose, findAllAnnotationsOnBean, findAnnotationOnBean, findAnnotationOnBean, finishBeanFactoryInitialization, finishRefresh, getAliases, getApplicationListeners, getApplicationName, getApplicationStartup, getAutowireCapableBeanFactory, getBean, getBean, getBean, getBean, getBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanFactoryPostProcessors, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanProvider, getBeanProvider, getBeanProvider, getBeanProvider, getBeansOfType, getBeansOfType, getBeansWithAnnotation, getDisplayName, getEnvironment, getId, getInternalParentBeanFactory, getInternalParentMessageSource, getMessage, getMessage, getMessage, getParent, getParentBeanFactory, getResourcePatternResolver, getResources, getStartupDate, getType, getType, initApplicationEventMulticaster, initLifecycleProcessor, initMessageSource, initPropertySources, invokeBeanFactoryPostProcessors, isActive, isClosed, isPrototype, isSingleton, isTypeMatch, isTypeMatch, obtainFreshBeanFactory, onClose, onRefresh, postProcessBeanFactory, prepareBeanFactory, prepareRefresh, publishEvent, publishEvent, registerListeners, registerShutdownHook, removeApplicationListener, resetCommonCaches, setApplicationStartup, setDisplayName, setEnvironment, setParent, toStringMethods inherited from class org.springframework.core.io.DefaultResourceLoader
addProtocolResolver, getClassLoader, getProtocolResolvers, getResource, getResourceByPath, getResourceCache, setClassLoaderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.context.ConfigurableApplicationContext
addProtocolResolver, setClassLoaderMethods inherited from interface org.frankframework.lifecycle.ConfigurableLifecycle
getPhase, isConfiguredMethods inherited from interface org.frankframework.core.FrankElement
addConfigWarningMethods inherited from interface org.springframework.core.io.ResourceLoader
getClassLoader, getResourceMethods inherited from interface org.springframework.context.SmartLifecycle
stop
-
Field Details
-
log
protected org.apache.logging.log4j.Logger log
-
-
Constructor Details
-
Configuration
public Configuration()
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(@Nonnull org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext()- Specified by:
getApplicationContextin interfaceHasApplicationContext
-
afterPropertiesSet
public void afterPropertiesSet()Spring's configure method. Only called when the Configuration has been added through a parent context!- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classorg.springframework.context.support.AbstractRefreshableConfigApplicationContext
-
refresh
Don't manually call this method. Spring should automatically trigger this when super.afterPropertiesSet(); is called.- Specified by:
refreshin interfaceorg.springframework.context.ConfigurableApplicationContext- Overrides:
refreshin classorg.springframework.context.support.AbstractApplicationContext- Throws:
org.springframework.beans.BeansExceptionIllegalStateException
-
registerBeanPostProcessors
protected void registerBeanPostProcessors(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) Enables theAutowiredannotation andConfigurationAwareobjects.- Overrides:
registerBeanPostProcessorsin classorg.springframework.context.support.AbstractApplicationContext
-
start
public void start()Spring method which starts the ApplicationContext. Loads + digests the configuration and calls start() in all registered beans that implement the SpringLifecycleinterface.- Specified by:
startin interfaceConfigurableLifecycle- Specified by:
startin interfaceorg.springframework.context.Lifecycle- Overrides:
startin classorg.springframework.context.support.AbstractApplicationContext
-
stop
public void stop()- Specified by:
stopin interfaceorg.springframework.context.Lifecycle- Overrides:
stopin classorg.springframework.context.support.AbstractApplicationContext
-
configure
Digest the configuration and generate flow diagram.- Specified by:
configurein interfaceIConfigurable- Throws:
ConfigurationException- in case it was not able to configure the component.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.springframework.context.ConfigurableApplicationContext- Overrides:
closein classorg.springframework.context.support.AbstractApplicationContext
-
publishEvent
public void publishEvent(org.springframework.context.ApplicationEvent event) - Specified by:
publishEventin interfaceorg.springframework.context.ApplicationEventPublisher- Overrides:
publishEventin classorg.springframework.context.support.AbstractApplicationContext
-
isUnloadInProgressOrDone
public boolean isUnloadInProgressOrDone() -
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle- Overrides:
isRunningin classorg.springframework.context.support.AbstractApplicationContext
-
setAutoStart
public void setAutoStart(boolean autoStart) If the Configuration should automatically start allAdaptersandScheduled Jobs. -
isAutoStartup
public boolean isAutoStartup()Description copied from interface:ConfigurableLifecycleBy default these beans are not started. TheConfigurationmay do so in theconfigure()method.- Specified by:
isAutoStartupin interfaceConfigurableLifecycle- Specified by:
isAutoStartupin interfaceorg.springframework.context.SmartLifecycle
-
isStubbed
public boolean isStubbed() -
getRegisteredAdapter
Get a registered adapter by its name.- Parameters:
name- the adapter to retrieve- Returns:
- Adapter
-
getRegisteredAdapters
-
getAdapters
-
addInclude
Include the referenced Module in this configuration -
addAdapter
Add adapter. -
removeAdapter
Remove adapter. -
setScheduleManager
Container for jobs scheduled for periodic execution. -
addScheduledJob
Deprecated.Add anjobfor scheduling at the configuration. The configuration will create anAdapterJobinstance and a JobDetail with the information from the parameters, after checking the parameters of the job. (basically, it checks whether the adapter and the receiver are registered.See the Quartz scheduler documentation
- Parameters:
jobdef- a JobDef object- Since:
- 4.0
- See Also:
-
setName
Configurations should be wired through Spring, which in turn should callsetBeanName(String). Once the ConfigurationContext has a name it should not be changed anymore, hencesuper.setBeanName(String)only sets the name once. If not created by Spring, the setIdCalled flag in AbstractRefreshableConfigApplicationContext wont be set, allowing the name to be updated. The DisplayName will always be updated, which is purely used for logging purposes. -
getName
-
setVersion
The version of the Configuration, typically provided by the BuildInfo.properties file. -
getClassLoaderType
If no ClassLoader has been set it tries to fall back on the `configurations.xxx.classLoaderType` property. Because of this, it may not always represent the correct or accurate type. -
setIbisManager
-
setOriginalConfiguration
The entire (raw) configuration -
setLoadedConfiguration
The loaded (with resolved properties) configuration -
getScheduledJob
-
getScheduledJobs
-
setConfigurationException
-
getConfigurationWarnings
-
getConfigurationClassLoader
Description copied from interface:IScopeProviderThis ClassLoader is set upon creation of the object, used to retrieve resources configured by the Ibis application.- Specified by:
getConfigurationClassLoaderin interfaceHasApplicationContext- Specified by:
getConfigurationClassLoaderin interfaceIScopeProvider- Returns:
- returns the ClassLoader created by the
ClassLoaderManager.
-
setSapSystems
-
setJmsRealms
-
addJmsRealm
Deprecated. -
setMonitoring
Container for monitor objects -
registerMonitoring
Deprecated. -
setErrorMessageFormatter
Set the defaultIErrorMessageFormatterfor all adapters in this configuration that do not have anErrorMessageFormatterdefined.- See Also:
-
setBeanName
Overwrite the DisplayName created by the super.setBeanName which prepends 'ApplicationContext'. The BeanName can only be set once, after which it only updates the DisplayName.- Specified by:
setBeanNamein interfaceorg.springframework.beans.factory.BeanNameAware- Overrides:
setBeanNamein classorg.springframework.context.support.AbstractRefreshableConfigApplicationContext
-