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
,IConfigurable
,IConfigurationAware
,INamedObject
,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 IConfigurable, org.springframework.context.ApplicationContextAware, ConfigurableLifecycle
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:
- Johan Verrips
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.core.io.DefaultResourceLoader
org.springframework.core.io.DefaultResourceLoader.ClassPathContextResource
-
Field Summary
Fields inherited from class org.springframework.context.support.AbstractApplicationContext
APPLICATION_EVENT_MULTICASTER_BEAN_NAME, LIFECYCLE_PROCESSOR_BEAN_NAME, logger, MESSAGE_SOURCE_BEAN_NAME
Fields inherited from interface org.springframework.beans.factory.BeanFactory
FACTORY_BEAN_PREFIX
Fields inherited from interface org.springframework.context.ConfigurableApplicationContext
APPLICATION_STARTUP_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_NAME
Fields inherited from interface org.springframework.core.io.ResourceLoader
CLASSPATH_URL_PREFIX
Fields inherited from interface org.springframework.core.io.support.ResourcePatternResolver
CLASSPATH_ALL_URL_PREFIX
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAdapter
(Adapter adapter) Add adapter.void
addInclude
(Include module) Include the referenced Module in this configurationvoid
addJmsRealm
(JmsRealm realm) Deprecated.void
addScheduledJob
(IJob jobdef) Deprecated.void
addStartAdapterThread
(Runnable runnable) void
addStopAdapterThread
(Runnable runnable) void
Spring's configure method.void
close()
void
Digest the configuration and generate flow diagram.org.springframework.context.ApplicationContext
String[]
getBeanNamesForType
(Class<?> type, boolean includeNonSingletons, boolean allowEagerInit) If 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 throughAdapterManager.getAdapter(String)
getScheduledJob
(String name) getState()
boolean
By default these beans are not started.boolean
boolean
boolean
boolean
void
Log a message to the MessageKeeper that corresponds to this configurationvoid
Log a message to the MessageKeeper that corresponds to this configurationvoid
log
(String message, MessageKeeper.MessageKeeperLevel level) Log a message to the MessageKeeper that corresponds to this configurationvoid
publishEvent
(org.springframework.context.ApplicationEvent event) void
refresh()
Don't manually call this method.void
registerMonitoring
(MonitorManager factory) Deprecated.void
removeStartAdapterThread
(Runnable runnable) void
removeStopAdapterThread
(Runnable runnable) void
setAdapterManager
(AdapterManager adapterManager) void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
setAutoStart
(boolean autoStart) If the Configuration should automatically start allAdapters
andScheduled Jobs
.void
setBeanName
(String name) Overwrite the DisplayName created by the super.setBeanName which prepends 'ApplicationContext'.void
setConfigurationException
(ConfigurationException exception) void
setIbisManager
(IbisManager ibisManager) void
setJmsRealms
(JmsRealmFactory realm) void
setLoadedConfiguration
(String loadedConfiguration) The loaded (with resolved properties) configurationvoid
setMonitoring
(MonitorManager monitorManager) Container for monitor objectsvoid
Configurations should be wired through Spring, which in turn should callsetBeanName(String)
.void
setOriginalConfiguration
(String originalConfiguration) The entire (raw) configurationvoid
setSapSystems
(SapSystems sapSystems) void
setScheduleManager
(ScheduleManager scheduleManager) Container for jobs scheduled for periodic execution.void
setSharedResources
(SharedResources resource) void
setVersion
(String version) The version of the Configuration, typically provided by the BuildInfo.properties file.void
start()
Spring method which starts the ApplicationContext.void
stop()
Methods inherited from class org.springframework.context.support.ClassPathXmlApplicationContext
getConfigResources
Methods inherited from class org.springframework.context.support.AbstractXmlApplicationContext
initBeanDefinitionReader, loadBeanDefinitions, loadBeanDefinitions, setValidating
Methods inherited from class org.springframework.context.support.AbstractRefreshableConfigApplicationContext
getConfigLocations, getDefaultConfigLocations, resolvePath, setConfigLocation, setConfigLocations, setId
Methods inherited from class org.springframework.context.support.AbstractRefreshableApplicationContext
assertBeanFactoryActive, cancelRefresh, closeBeanFactory, createBeanFactory, customizeBeanFactory, getBeanFactory, hasBeanFactory, refreshBeanFactory, setAllowBeanDefinitionOverriding, setAllowCircularReferences
Methods inherited from class org.springframework.context.support.AbstractApplicationContext
addApplicationListener, addBeanFactoryPostProcessor, 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, 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, isPrototype, isSingleton, isTypeMatch, isTypeMatch, obtainFreshBeanFactory, onClose, onRefresh, postProcessBeanFactory, prepareBeanFactory, prepareRefresh, publishEvent, publishEvent, registerBeanPostProcessors, registerListeners, registerShutdownHook, removeApplicationListener, resetCommonCaches, setApplicationStartup, setDisplayName, setEnvironment, setParent, toString
Methods inherited from class org.springframework.core.io.DefaultResourceLoader
addProtocolResolver, clearResourceCaches, getClassLoader, getProtocolResolvers, getResource, getResourceByPath, getResourceCache, setClassLoader
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.context.ConfigurableApplicationContext
addProtocolResolver, setClassLoader
Methods inherited from interface org.frankframework.lifecycle.ConfigurableLifecycle
getPhase
Methods inherited from interface org.springframework.core.io.ResourceLoader
getClassLoader, getResource
Methods 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:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext()- Specified by:
getApplicationContext
in interfaceIConfigurationAware
-
afterPropertiesSet
public void afterPropertiesSet()Spring's configure method. Only called when the Configuration has been added through a parent context!- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in classorg.springframework.context.support.AbstractRefreshableConfigApplicationContext
-
refresh
Don't manually call this method. Spring should automatically trigger this when super.afterPropertiesSet(); is called.- Specified by:
refresh
in interfaceorg.springframework.context.ConfigurableApplicationContext
- Overrides:
refresh
in classorg.springframework.context.support.AbstractApplicationContext
- Throws:
org.springframework.beans.BeansException
IllegalStateException
-
getBeanNamesForType
public String[] getBeanNamesForType(Class<?> type, boolean includeNonSingletons, boolean allowEagerInit) - Specified by:
getBeanNamesForType
in interfaceorg.springframework.beans.factory.ListableBeanFactory
- Overrides:
getBeanNamesForType
in 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 SpringLifecycle
interface.- Specified by:
start
in interfaceorg.springframework.context.Lifecycle
- Overrides:
start
in classorg.springframework.context.support.AbstractApplicationContext
-
stop
public void stop()- Specified by:
stop
in interfaceorg.springframework.context.Lifecycle
- Overrides:
stop
in classorg.springframework.context.support.AbstractApplicationContext
-
configure
Digest the configuration and generate flow diagram.- Specified by:
configure
in interfaceConfigurableLifecycle
- Specified by:
configure
in interfaceIConfigurable
- Throws:
ConfigurationException
- in case it was not able to configure the component.
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceorg.springframework.context.ConfigurableApplicationContext
- Overrides:
close
in classorg.springframework.context.support.AbstractApplicationContext
-
publishEvent
public void publishEvent(org.springframework.context.ApplicationEvent event) - Specified by:
publishEvent
in interfaceorg.springframework.context.ApplicationEventPublisher
- Overrides:
publishEvent
in classorg.springframework.context.support.AbstractApplicationContext
-
log
Log a message to the MessageKeeper that corresponds to this configuration -
log
Log a message to the MessageKeeper that corresponds to this configuration -
log
Log a message to the MessageKeeper that corresponds to this configuration -
isUnloadInProgressOrDone
public boolean isUnloadInProgressOrDone() -
isRunning
public boolean isRunning()- Specified by:
isRunning
in interfaceorg.springframework.context.Lifecycle
- Overrides:
isRunning
in classorg.springframework.context.support.AbstractApplicationContext
-
setAutoStart
public void setAutoStart(boolean autoStart) If the Configuration should automatically start allAdapters
andScheduled Jobs
. -
isAutoStartup
public boolean isAutoStartup()Description copied from interface:ConfigurableLifecycle
By default these beans are not started. TheConfiguration
may do so in theconfigure()
method.- Specified by:
isAutoStartup
in interfaceConfigurableLifecycle
- Specified by:
isAutoStartup
in interfaceorg.springframework.context.SmartLifecycle
-
isStubbed
public boolean isStubbed() -
getRegisteredAdapter
Get a registered adapter by its name throughAdapterManager.getAdapter(String)
- Parameters:
name
- the adapter to retrieve- Returns:
- Adapter
-
getRegisteredAdapters
-
addStartAdapterThread
-
removeStartAdapterThread
-
addStopAdapterThread
-
removeStopAdapterThread
-
addInclude
Include the referenced Module in this configuration -
addAdapter
Add adapter. -
setScheduleManager
Container for jobs scheduled for periodic execution. -
addScheduledJob
Deprecated.Add anjob
for scheduling at the configuration. The configuration will create anAdapterJob
instance 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.- Specified by:
setName
in interfaceINamedObject
-
getName
- Specified by:
getName
in interfaceIConfigurationAware
- Specified by:
getName
in interfaceINamedObject
-
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:IScopeProvider
This ClassLoader is set upon creation of the object, used to retrieve resources configured by the Ibis application.- Specified by:
getConfigurationClassLoader
in interfaceIScopeProvider
- Returns:
- returns the ClassLoader created by the
ClassLoaderManager
.
-
setSapSystems
-
setJmsRealms
-
addJmsRealm
Deprecated. -
setMonitoring
Container for monitor objects -
registerMonitoring
Deprecated. -
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:
setBeanName
in interfaceorg.springframework.beans.factory.BeanNameAware
- Overrides:
setBeanName
in classorg.springframework.context.support.AbstractRefreshableConfigApplicationContext
-
getAdapterManager
-
setAdapterManager
-
getScheduleManager
-
getState
-
getVersion
-
getIbisManager
-
getOriginalConfiguration
-
getLoadedConfiguration
-
isConfigured
public boolean isConfigured() -
getConfigurationException
-