public class Configuration extends org.springframework.context.support.ClassPathXmlApplicationContext implements IConfigurable, org.springframework.context.ApplicationContextAware, ConfigurableLifecycle
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.
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.org.springframework.core.io.DefaultResourceLoader.ClassPathContextResource
ConfigurableLifecycle.BootState
Modifier and Type | Field and Description |
---|---|
protected org.apache.logging.log4j.Logger |
log |
APPLICATION_EVENT_MULTICASTER_BEAN_NAME, LIFECYCLE_PROCESSOR_BEAN_NAME, logger, MESSAGE_SOURCE_BEAN_NAME
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
Constructor and Description |
---|
Configuration() |
Modifier and Type | Method and Description |
---|---|
void |
addStartAdapterThread(Runnable runnable) |
void |
addStopAdapterThread(Runnable runnable) |
void |
afterPropertiesSet()
Spring's configure method.
|
void |
close() |
void |
configure()
Digest the configuration and generate flow diagram.
|
void |
dumpStatistics(HasStatistics.Action action) |
org.springframework.context.ApplicationContext |
getApplicationContext() |
String[] |
getBeanNamesForType(Class<?> type,
boolean includeNonSingletons,
boolean allowEagerInit) |
String |
getClassLoaderType()
If no ClassLoader has been set it tries to fall back on the `configurations.xxx.classLoaderType` property.
|
ClassLoader |
getConfigurationClassLoader()
This ClassLoader is set upon creation of the object, used to retrieve resources configured by the Ibis application.
|
ConfigurationWarnings |
getConfigurationWarnings() |
String |
getName() |
Adapter |
getRegisteredAdapter(String name)
Get a registered adapter by its name through
AdapterManager.getAdapter(String) |
List<Adapter> |
getRegisteredAdapters() |
IJob |
getScheduledJob(String name) |
List<IJob> |
getScheduledJobs() |
void |
initMetrics() |
boolean |
isAutoStart() |
boolean |
isRunning() |
boolean |
isStubbed() |
boolean |
isUnloadInProgressOrDone() |
void |
log(String message)
Log a message to the MessageKeeper that corresponds to this configuration
|
void |
log(String message,
Exception e)
Log a message to the MessageKeeper that corresponds to this configuration
|
void |
log(String message,
MessageKeeper.MessageKeeperLevel level)
Log a message to the MessageKeeper that corresponds to this configuration
|
void |
publishEvent(org.springframework.context.ApplicationEvent event) |
void |
refresh()
Don't manually call this method.
|
void |
registerAdapter(Adapter adapter)
Add adapter.
|
void |
registerInclude(Include module)
Include the referenced Module in this configuration
|
void |
registerJmsRealm(JmsRealm realm)
Deprecated.
|
void |
registerMonitoring(MonitorManager factory)
Deprecated.
|
void |
registerScheduledJob(IJob jobdef)
Deprecated.
|
void |
registerStatisticsHandler(StatisticsKeeperIterationHandler handler) |
void |
removeStartAdapterThread(Runnable runnable) |
void |
removeStopAdapterThread(Runnable runnable) |
protected void |
runMigrator()
Execute any database changes before calling
configure() . |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setAutoStart(boolean autoStart)
If the Configuration should automatically start all
Adapters and Scheduled 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) configuration
|
void |
setMonitoring(MonitorManager monitorManager)
Container for monitor objects
|
void |
setName(String name)
Configurations should be wired through Spring, which in turn should call
setBeanName(String) . |
void |
setOriginalConfiguration(String originalConfiguration)
The entire (raw) configuration
|
void |
setSapSystems(SapSystems sapSystems) |
void |
setScheduleManager(ScheduleManager scheduleManager)
Container for jobs scheduled for periodic execution.
|
void |
setVersion(String version)
The version of the Configuration, typically provided by the BuildInfo.properties file.
|
void |
start()
Spring method which starts the ApplicationContext.
|
getConfigResources
initBeanDefinitionReader, loadBeanDefinitions, loadBeanDefinitions, setValidating
getConfigLocations, getDefaultConfigLocations, resolvePath, setConfigLocation, setConfigLocations, setId
assertBeanFactoryActive, cancelRefresh, closeBeanFactory, createBeanFactory, customizeBeanFactory, getBeanFactory, hasBeanFactory, refreshBeanFactory, setAllowBeanDefinitionOverriding, setAllowCircularReferences
addApplicationListener, addBeanFactoryPostProcessor, containsBean, containsBeanDefinition, containsLocalBean, createEnvironment, destroy, destroyBeans, doClose, 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, resetCommonCaches, setApplicationStartup, setDisplayName, setEnvironment, setParent, stop, toString
addProtocolResolver, clearResourceCaches, getClassLoader, getProtocolResolvers, getResource, getResourceByPath, getResourceCache, setClassLoader
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getState, inState
public void dumpStatistics(HasStatistics.Action action)
public void initMetrics() throws ConfigurationException
ConfigurationException
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
public org.springframework.context.ApplicationContext getApplicationContext()
getApplicationContext
in interface IConfigurationAware
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class org.springframework.context.support.AbstractRefreshableConfigApplicationContext
public void refresh() throws org.springframework.beans.BeansException, IllegalStateException
refresh
in interface org.springframework.context.ConfigurableApplicationContext
refresh
in class org.springframework.context.support.AbstractApplicationContext
org.springframework.beans.BeansException
IllegalStateException
public String[] getBeanNamesForType(Class<?> type, boolean includeNonSingletons, boolean allowEagerInit)
getBeanNamesForType
in interface org.springframework.beans.factory.ListableBeanFactory
getBeanNamesForType
in class org.springframework.context.support.AbstractApplicationContext
public void start()
Lifecycle
interface.start
in interface org.springframework.context.Lifecycle
start
in class org.springframework.context.support.AbstractApplicationContext
public void configure() throws ConfigurationException
configure
in interface IConfigurable
configure
in interface ConfigurableLifecycle
ConfigurationException
protected void runMigrator()
configure()
.public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in interface org.springframework.context.ConfigurableApplicationContext
close
in class org.springframework.context.support.AbstractApplicationContext
public void publishEvent(org.springframework.context.ApplicationEvent event)
publishEvent
in interface org.springframework.context.ApplicationEventPublisher
publishEvent
in class org.springframework.context.support.AbstractApplicationContext
public void log(String message)
public void log(String message, MessageKeeper.MessageKeeperLevel level)
public void log(String message, Exception e)
public boolean isUnloadInProgressOrDone()
public boolean isRunning()
isRunning
in interface ConfigurableLifecycle
isRunning
in interface org.springframework.context.Lifecycle
isRunning
in class org.springframework.context.support.AbstractApplicationContext
public void setAutoStart(boolean autoStart)
Adapters
and Scheduled Jobs
.public boolean isAutoStart()
public boolean isStubbed()
public Adapter getRegisteredAdapter(String name)
AdapterManager.getAdapter(String)
name
- the adapter to retrievepublic void addStartAdapterThread(Runnable runnable)
public void removeStartAdapterThread(Runnable runnable)
public void addStopAdapterThread(Runnable runnable)
public void removeStopAdapterThread(Runnable runnable)
public void registerInclude(Include module)
public void registerAdapter(Adapter adapter)
public void setScheduleManager(ScheduleManager scheduleManager)
@Deprecated public void registerScheduledJob(IJob jobdef)
job
for scheduling at the configuration.
The configuration will create an AdapterJob
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
jobdef
- a JobDef objectfor a description of Cron triggers
public void registerStatisticsHandler(StatisticsKeeperIterationHandler handler) throws ConfigurationException
ConfigurationException
public void setName(String name)
setBeanName(String)
.
Once the ConfigurationContext has a name it should not be changed anymore, hence
super.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.setName
in interface INamedObject
public String getName()
getName
in interface IConfigurationAware
getName
in interface INamedObject
@Protected public void setVersion(String version)
public String getClassLoaderType()
public void setIbisManager(IbisManager ibisManager)
@Protected public void setOriginalConfiguration(String originalConfiguration)
@Protected public void setLoadedConfiguration(String loadedConfiguration)
public void setConfigurationException(ConfigurationException exception)
public ConfigurationWarnings getConfigurationWarnings()
public ClassLoader getConfigurationClassLoader()
IScopeProvider
getConfigurationClassLoader
in interface IScopeProvider
ClassLoaderManager
.public void setSapSystems(SapSystems sapSystems)
public void setJmsRealms(JmsRealmFactory realm)
@Deprecated public void registerJmsRealm(JmsRealm realm)
public void setMonitoring(MonitorManager monitorManager)
@Deprecated public void registerMonitoring(MonitorManager factory)
@Protected public void setBeanName(String name)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
setBeanName
in class org.springframework.context.support.AbstractRefreshableConfigApplicationContext
Copyright © 2023 Frank!Framework. All rights reserved.