Package org.frankframework.lifecycle
Class ConfiguringLifecycleProcessor
java.lang.Object
org.springframework.context.support.DefaultLifecycleProcessor
org.frankframework.lifecycle.ConfiguringLifecycleProcessor
- All Implemented Interfaces:
IConfigurable,ConfigurableLifecycle,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.context.Lifecycle,org.springframework.context.LifecycleProcessor,org.springframework.context.Phased,org.springframework.context.SmartLifecycle
public class ConfiguringLifecycleProcessor
extends org.springframework.context.support.DefaultLifecycleProcessor
implements ConfigurableLifecycle
This class is a custom implementation of the Spring
DefaultLifecycleProcessor that adds support for
ConfigurableLifecycle beans. It allows for the configuration of lifecycle beans before they are started.
Additionally it adds logging capabilities to track the context that's being lifecycled.
See ConfigurableApplicationContext for more information.
-
Field Summary
Fields inherited from class org.springframework.context.support.DefaultLifecycleProcessor
CHECKPOINT_PROPERTY_NAME, EXIT_PROPERTY_NAME, ON_REFRESH_VALUEFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsConstructorDescriptionConfiguringLifecycleProcessor(org.springframework.context.ApplicationContext context) -
Method Summary
Modifier and TypeMethodDescriptionvoidTheConfigurationDigestermay add new Lifecycle beans.Override so we can filter onManagableLifecyclebeans.voidvoidstart()Auto-start triggered byConfigurationafterconfigure()has been called, which starts all newly (non-started) registered beans.voidstop()Methods inherited from class org.springframework.context.support.DefaultLifecycleProcessor
getPhase, isRunning, onClose, setBeanFactory, setConcurrentStartupForPhase, setConcurrentStartupForPhases, setTimeoutForShutdownPhase, setTimeoutPerShutdownPhase, setTimeoutsForShutdownPhasesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.frankframework.lifecycle.ConfigurableLifecycle
getPhase, isAutoStartup, isConfiguredMethods inherited from interface org.springframework.context.Lifecycle
isRunningMethods inherited from interface org.springframework.context.SmartLifecycle
stop
-
Constructor Details
-
ConfiguringLifecycleProcessor
public ConfiguringLifecycleProcessor(org.springframework.context.ApplicationContext context)
-
-
Method Details
-
configure
TheConfigurationDigestermay add new Lifecycle beans. Which is why it cannot be aConfigurableLifecycleitself.- Specified by:
configurein interfaceIConfigurable- Throws:
ConfigurationException- in case it was not able to configure the component.
-
onRefresh
public void onRefresh()- Specified by:
onRefreshin interfaceorg.springframework.context.LifecycleProcessor- Overrides:
onRefreshin classorg.springframework.context.support.DefaultLifecycleProcessor
-
start
public void start()Auto-start triggered byConfigurationafterconfigure()has been called, which starts all newly (non-started) registered beans. Only (Smart-)LifeCycle beans or beans withConfigurableLifecycle.isAutoStartup()will be started.- Specified by:
startin interfaceConfigurableLifecycle- Specified by:
startin interfaceorg.springframework.context.Lifecycle- Overrides:
startin classorg.springframework.context.support.DefaultLifecycleProcessor
-
stop
public void stop()- Specified by:
stopin interfaceorg.springframework.context.Lifecycle- Overrides:
stopin classorg.springframework.context.support.DefaultLifecycleProcessor
-
getLifecycleBeans
Override so we can filter onManagableLifecyclebeans.- Overrides:
getLifecycleBeansin classorg.springframework.context.support.DefaultLifecycleProcessor
-