Package org.activiti.spring
Class AbstractActivitiSmartLifeCycle
java.lang.Object
org.activiti.spring.AbstractActivitiSmartLifeCycle
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle
- Direct Known Subclasses:
ApplicationDeployedEventProducer,ProcessCandidateStartersEventProducer,ProcessDeployedEventProducer,StartMessageDeployedEventProducer
public abstract class AbstractActivitiSmartLifeCycle
extends Object
implements org.springframework.context.SmartLifecycle, org.springframework.beans.factory.DisposableBean
-
Field Summary
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()abstract voiddoStart()abstract voiddoStop()intgetPhase()Return the phase in which this component will be started and stopped.booleanReturn the value for the 'autoStartup' property.booleanvoidsetAutoStartup(boolean autoStartup) Set whether to auto-start the activation after this component has been initialized and the context has been refreshed.voidsetPhase(int phase) Specify the phase in which this component should be started and stopped.voidstart()voidstop()void
-
Constructor Details
-
AbstractActivitiSmartLifeCycle
public AbstractActivitiSmartLifeCycle()
-
-
Method Details
-
doStart
public abstract void doStart() -
doStop
public abstract void doStop() -
setAutoStartup
public void setAutoStartup(boolean autoStartup) Set whether to auto-start the activation after this component has been initialized and the context has been refreshed.Default is "true". Turn this flag off to defer the endpoint activation until an explicit
start()call. -
isAutoStartup
public boolean isAutoStartup()Return the value for the 'autoStartup' property. If "true", this component will start upon a ContextRefreshedEvent.- Specified by:
isAutoStartupin interfaceorg.springframework.context.SmartLifecycle
-
setPhase
public void setPhase(int phase) Specify the phase in which this component should be started and stopped. The startup order proceeds from lowest to highest, and the shutdown order is the reverse of that. By default this value is Integer.MAX_VALUE meaning that this component starts as late as possible and stops as soon as possible. -
getPhase
public int getPhase()Return the phase in which this component will be started and stopped.- Specified by:
getPhasein interfaceorg.springframework.context.Phased- Specified by:
getPhasein interfaceorg.springframework.context.SmartLifecycle
-
start
public void start()- Specified by:
startin interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()- Specified by:
stopin interfaceorg.springframework.context.Lifecycle
-
stop
- Specified by:
stopin interfaceorg.springframework.context.SmartLifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean
-