Class WorkerJobListenerContainer

java.lang.Object
org.flowable.external.worker.listener.WorkerJobListenerContainer
All Implemented Interfaces:
FlowableWorkerContainer, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle

public class WorkerJobListenerContainer extends Object implements FlowableWorkerContainer, org.springframework.beans.factory.BeanNameAware
Author:
Filip Hrisafov
  • Field Details

    • logger

      protected final org.slf4j.Logger logger
    • executors

      protected final List<org.springframework.core.task.AsyncTaskExecutor> executors
    • runningJobs

      protected final List<CompletableFuture<Void>> runningJobs
    • lifecycleMonitor

      protected final Object lifecycleMonitor
    • running

      protected volatile boolean running
    • beanName

      protected String beanName
    • phase

      protected int phase
    • concurrency

      protected int concurrency
    • shutdownTimeout

      protected int shutdownTimeout
    • topic

      protected String topic
    • lockDuration

      protected Duration lockDuration
    • numberOfRetries

      protected int numberOfRetries
    • numberOfTasks

      protected int numberOfTasks
    • pollingInterval

      protected Duration pollingInterval
    • workerJobListener

      protected FlowableWorkerJobListener workerJobListener
    • externalWorkerClient

      protected final ExternalWorkerClient externalWorkerClient
  • Constructor Details

    • WorkerJobListenerContainer

      public WorkerJobListenerContainer(ExternalWorkerClient externalWorkerClient)
  • Method Details

    • setupWorkerJobListener

      public void setupWorkerJobListener(FlowableWorkerJobListener workerJobListener)
      Specified by:
      setupWorkerJobListener in interface FlowableWorkerContainer
    • setBeanName

      public void setBeanName(String name)
      Specified by:
      setBeanName in interface org.springframework.beans.factory.BeanNameAware
    • 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
    • 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(Runnable callback)
      Specified by:
      stop in interface org.springframework.context.SmartLifecycle
    • doStop

      protected void doStop(Runnable callback)
    • getConcurrency

      public int getConcurrency()
    • setConcurrency

      public void setConcurrency(int concurrency)
    • getTopic

      public String getTopic()
    • setTopic

      public void setTopic(String topic)
    • getLockDuration

      public Duration getLockDuration()
    • setLockDuration

      public void setLockDuration(Duration lockDuration)
    • getNumberOfRetries

      public int getNumberOfRetries()
    • setNumberOfRetries

      public void setNumberOfRetries(int numberOfRetries)
    • getNumberOfTasks

      public int getNumberOfTasks()
    • setNumberOfTasks

      public void setNumberOfTasks(int numberOfTasks)
    • getPollingInterval

      public Duration getPollingInterval()
    • setPollingInterval

      public void setPollingInterval(Duration pollingInterval)