Class ZeebeAutoStartUpLifecycle<T extends AutoCloseable>

  • Type Parameters:
    T - type of delegate to start/stop
    All Implemented Interfaces:
    Supplier<T>, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle

    public abstract class ZeebeAutoStartUpLifecycle<T extends AutoCloseable>
    extends Object
    implements org.springframework.context.SmartLifecycle, Supplier<T>
    Implementation of SmartLifecycle that delegates to a delegate of type T and defaults to autostart.
    • Constructor Detail

      • ZeebeAutoStartUpLifecycle

        public ZeebeAutoStartUpLifecycle​(int phase,
                                         ZeebeObjectFactory<T> factory)
        Creates a new lifecycle.
        Parameters:
        phase - the phase to run in
    • Method Detail

      • isAutoStartup

        public boolean isAutoStartup()
        Specified by:
        isAutoStartup in interface org.springframework.context.SmartLifecycle
      • start

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

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

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

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

        public int getPhase()
        Specified by:
        getPhase in interface org.springframework.context.Phased
        Specified by:
        getPhase in interface org.springframework.context.SmartLifecycle