Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » context » [javadoc | source]
org.springframework.context
public interface: Lifecycle [javadoc | source]

All Known Implementing Classes:
    XmlWebApplicationContext, StaticApplicationContext, ServerSessionMessageListenerContainer, ClassPathXmlApplicationContext, GenericMessageEndpointManager, GenericApplicationContext, AbstractXmlApplicationContext, GenericWebApplicationContext, SimpleMessageListenerContainer, AbstractPollingMessageListenerContainer, DefaultMessageListenerContainer, ResourceAdapterApplicationContext, AbstractRefreshableWebApplicationContext, ConfigurableApplicationContext, DefaultMessageListenerContainer102, FileSystemXmlApplicationContext, AbstractRefreshableConfigApplicationContext, SchedulerFactoryBean, ConfigurableWebApplicationContext, JmsMessageEndpointManager, StaticPortletApplicationContext, AbstractMessageListenerContainer, StaticWebApplicationContext, AbstractApplicationContext, AbstractRefreshableApplicationContext, AbstractRefreshablePortletApplicationContext, AbstractJmsListeningContainer, XmlPortletApplicationContext, ConfigurablePortletApplicationContext, ServerSessionMessageListenerContainer102, TimerManagerFactoryBean, SimpleMessageListenerContainer102

Interface defining methods for start/stop lifecycle control. The typical use case for this is to control asynchronous processing.

Can be implemented by both components (typically a Spring bean defined in a Spring org.springframework.beans.factory.BeanFactory ) and containers (typically a Spring ApplicationContext ). Containers will propagate start/stop signals to all components that apply.

Can be used for direct invocations or for management operations via JMX. In the latter case, the org.springframework.jmx.export.MBeanExporter will typically be defined with an org.springframework.jmx.export.assembler.InterfaceBasedMBeanInfoAssembler , restricting the visibility of activity-controlled components to the Lifecycle interface.

Method from org.springframework.context.Lifecycle Summary:
isRunning,   start,   stop
Method from org.springframework.context.Lifecycle Detail:
 public boolean isRunning()
    Check whether this component is currently running.

    In the case of a container, this will return true only if all components that apply are currently running.

 public  void start()
    Start this component. Should not throw an exception if the component is already running.

    In the case of a container, this will propagate the start signal to all components that apply.

 public  void stop()
    Stop this component. Should not throw an exception if the component isn't started yet.

    In the case of a container, this will propagate the stop signal to all components that apply.