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
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected intprotected final List<org.springframework.core.task.AsyncTaskExecutor>protected final ExternalWorkerClientprotected final Objectprotected Durationprotected final org.slf4j.Loggerprotected intprotected intprotected intprotected Durationprotected booleanprotected final List<CompletableFuture<Void>>protected intprotected Stringprotected FlowableWorkerJobListenerFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidintintintintgetPhase()getTopic()booleanvoidsetBeanName(String name) voidsetConcurrency(int concurrency) voidsetLockDuration(Duration lockDuration) voidsetNumberOfRetries(int numberOfRetries) voidsetNumberOfTasks(int numberOfTasks) voidsetPollingInterval(Duration pollingInterval) voidvoidsetupWorkerJobListener(FlowableWorkerJobListener workerJobListener) voidstart()voidstop()voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.SmartLifecycle
isAutoStartup
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
executors
-
runningJobs
-
lifecycleMonitor
-
running
protected volatile boolean running -
beanName
-
phase
protected int phase -
concurrency
protected int concurrency -
shutdownTimeout
protected int shutdownTimeout -
topic
-
lockDuration
-
numberOfRetries
protected int numberOfRetries -
numberOfTasks
protected int numberOfTasks -
pollingInterval
-
workerJobListener
-
externalWorkerClient
-
-
Constructor Details
-
WorkerJobListenerContainer
-
-
Method Details
-
setupWorkerJobListener
- Specified by:
setupWorkerJobListenerin interfaceFlowableWorkerContainer
-
setBeanName
- Specified by:
setBeanNamein interfaceorg.springframework.beans.factory.BeanNameAware
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle
-
getPhase
public int getPhase()- 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
-
doStop
-
getConcurrency
public int getConcurrency() -
setConcurrency
public void setConcurrency(int concurrency) -
getTopic
-
setTopic
-
getLockDuration
-
setLockDuration
-
getNumberOfRetries
public int getNumberOfRetries() -
setNumberOfRetries
public void setNumberOfRetries(int numberOfRetries) -
getNumberOfTasks
public int getNumberOfTasks() -
setNumberOfTasks
public void setNumberOfTasks(int numberOfTasks) -
getPollingInterval
-
setPollingInterval
-