Class AbstractActivitiSmartLifeCycle

  • All Implemented Interfaces:
    org.springframework.beans.factory.DisposableBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle
    Direct Known Subclasses:
    ProcessDeployedEventProducer, StartMessageDeployedEventProducer

    public abstract class AbstractActivitiSmartLifeCycle
    extends java.lang.Object
    implements org.springframework.context.SmartLifecycle, org.springframework.beans.factory.DisposableBean
    • Field Summary

      • Fields inherited from interface org.springframework.context.SmartLifecycle

        DEFAULT_PHASE
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void destroy()  
      abstract void doStart()  
      abstract void doStop()  
      int getPhase()
      Return the phase in which this component will be started and stopped.
      boolean isAutoStartup()
      Return the value for the 'autoStartup' property.
      boolean isRunning()  
      void setAutoStartup​(boolean autoStartup)
      Set whether to auto-start the activation after this component has been initialized and the context has been refreshed.
      void setPhase​(int phase)
      Specify the phase in which this component should be started and stopped.
      void start()  
      void stop()  
      void stop​(java.lang.Runnable callback)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractActivitiSmartLifeCycle

        public AbstractActivitiSmartLifeCycle()
    • Method Detail

      • 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:
        isAutoStartup in interface org.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:
        getPhase in interface org.springframework.context.Phased
        Specified by:
        getPhase in interface org.springframework.context.SmartLifecycle
      • start

        public void start()
        Specified by:
        start in interface org.springframework.context.Lifecycle
      • stop

        public void stop()
        Specified by:
        stop in interface org.springframework.context.Lifecycle
      • stop

        public void stop​(java.lang.Runnable callback)
        Specified by:
        stop in interface org.springframework.context.SmartLifecycle
      • isRunning

        public boolean isRunning()
        Specified by:
        isRunning in interface org.springframework.context.Lifecycle
      • destroy

        public void destroy()
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean