|
spring-context | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.context.support.DefaultLifecycleProcessor
public class DefaultLifecycleProcessor
Default implementation of the LifecycleProcessor strategy.
| Constructor Summary | |
|---|---|
DefaultLifecycleProcessor()
|
|
| Method Summary | |
|---|---|
protected java.util.Map<java.lang.String,Lifecycle> |
getLifecycleBeans()
Retrieve all applicable Lifecycle beans: all singletons that have already been created, as well as all SmartLifecycle beans (even if they are marked as lazy-init). |
protected int |
getPhase(Lifecycle bean)
Determine the lifecycle phase of the given bean. |
boolean |
isRunning()
Check whether this component is currently running. |
void |
onClose()
Notification of context close phase, e.g. |
void |
onRefresh()
Notification of context refresh, e.g. |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
|
void |
setTimeoutPerShutdownPhase(long timeoutPerShutdownPhase)
Specify the maximum time allotted in milliseconds for the shutdown of any phase (group of SmartLifecycle beans with the same 'phase' value). |
void |
start()
Start all registered beans that implement Lifecycle and are not already running. |
void |
stop()
Stop all registered beans that implement Lifecycle and are currently running. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultLifecycleProcessor()
| Method Detail |
|---|
public void setTimeoutPerShutdownPhase(long timeoutPerShutdownPhase)
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwarepublic void start()
start in interface Lifecyclepublic void stop()
stop in interface LifecycleSmartLifecycle.stop(Runnable)public void onRefresh()
LifecycleProcessor
onRefresh in interface LifecycleProcessorpublic void onClose()
LifecycleProcessor
onClose in interface LifecycleProcessorpublic boolean isRunning()
LifecycleIn the case of a container, this will return true
only if all components that apply are currently running.
isRunning in interface Lifecycleprotected java.util.Map<java.lang.String,Lifecycle> getLifecycleBeans()
protected int getPhase(Lifecycle bean)
The default implementation checks for the Phased interface.
Can be overridden to apply other/further policies.
bean - the bean to introspect
Phased,
SmartLifecycle
|
spring-context | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||