Class AbstractFlowableWorkerEndpoint

java.lang.Object
org.flowable.external.worker.config.AbstractFlowableWorkerEndpoint
All Implemented Interfaces:
FlowableWorkerEndpoint
Direct Known Subclasses:
MethodFlowableWorkerEndpoint

public abstract class AbstractFlowableWorkerEndpoint extends Object implements FlowableWorkerEndpoint
Base model for a Flowable worker endpoint.
Author:
Filip Hrisafov
See Also:
  • Field Details

    • id

      protected String id
    • topic

      protected String topic
    • lockDuration

      protected Duration lockDuration
    • pollingInterval

      protected Duration pollingInterval
    • numberOfRetries

      protected Integer numberOfRetries
    • numberOfTasks

      protected Integer numberOfTasks
    • concurrency

      protected Integer concurrency
  • Constructor Details

    • AbstractFlowableWorkerEndpoint

      public AbstractFlowableWorkerEndpoint()
  • Method Details

    • setId

      public void setId(String id)
      Set a custom id for this endpoint.
    • getId

      public String getId()
      Return the id of this endpoint (possibly generated).
      Specified by:
      getId in interface FlowableWorkerEndpoint
    • setTopic

      public void setTopic(String topic)
      Set the name of the topic for this endpoint.
    • getTopic

      public String getTopic()
      Return the name of the topic for this endpoint.
    • setLockDuration

      public void setLockDuration(Duration lockDuration)
      Set lock duration when requesting jobs
    • getLockDuration

      public Duration getLockDuration()
      Return lock duration when requesting jobs, if any.
    • setPollingInterval

      public void setPollingInterval(Duration pollingInterval)
      Set polling interval for requesting jobs
    • getPollingInterval

      public Duration getPollingInterval()
      Return polling interval for requesting jobs, if any.
    • setNumberOfRetries

      public void setNumberOfRetries(Integer numberOfRetries)
      Set the number of retries that should be sent when requesting jobs.
    • getNumberOfRetries

      public Integer getNumberOfRetries()
      Return the number of retries that should be sent when requesting jobs, if any.
    • setNumberOfTasks

      public void setNumberOfTasks(Integer numberOfTasks)
      Set the amount of jobs that should be requested, if any.
    • getNumberOfTasks

      public Integer getNumberOfTasks()
      Return the number of jobs that should be requested, if any.
    • setConcurrency

      public void setConcurrency(Integer concurrency)
      Set the amount of concurrent workers that will be polling for jobs.
    • getConcurrency

      public Integer getConcurrency()
      Return the amount of concurrent workers that will be polling for jobs.
    • setupWorkerContainer

      public void setupWorkerContainer(FlowableWorkerContainer workerContainer)
      Description copied from interface: FlowableWorkerEndpoint
      Set up the specified worker container with the model defined by this endpoint.

      This endpoint must provide the requested missing option(s) of the specified container to make it usable. Usually, this is about setting the topic and the workerContainer to use but an implementation may override any default setting that was already set.

      Specified by:
      setupWorkerContainer in interface FlowableWorkerEndpoint
      Parameters:
      workerContainer - the worker container to configure
    • setupFlowableWorkerContainer

      protected void setupFlowableWorkerContainer(WorkerJobListenerContainer workerContainer)
    • createWorkerJobListener

      protected abstract FlowableWorkerJobListener createWorkerJobListener(FlowableWorkerContainer container)
      Create a FlowableWorkerJobListener that is able to serve this endpoint for the specified container.
    • setupWorkerJobListener

      protected void setupWorkerJobListener(FlowableWorkerContainer container)
    • getEndpointDescription

      protected StringBuilder getEndpointDescription()
      Return a description for this endpoint.

      Available to subclasses, for inclusion in their toString() result.

    • toString

      public String toString()
      Overrides:
      toString in class Object