Class WorkersTemplate
java.lang.Object
io.temporal.spring.boot.autoconfigure.template.WorkersTemplate
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.context.EnvironmentAware
public class WorkersTemplate
extends Object
implements org.springframework.beans.factory.BeanFactoryAware, org.springframework.context.EnvironmentAware
Creates a
WorkerFactory and Workers for a given namespace provided by WorkflowClient.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsConstructorDescriptionWorkersTemplate(NamespaceProperties namespaceProperties, ClientTemplate clientTemplate, List<io.temporal.common.interceptors.WorkerInterceptor> workerInterceptors, io.opentracing.Tracer tracer, TestWorkflowEnvironmentAdapter testWorkflowEnvironment, List<TemporalOptionsCustomizer<io.temporal.worker.WorkerFactoryOptions.Builder>> workerFactoryCustomizers, List<TemporalOptionsCustomizer<io.temporal.worker.WorkerOptions.Builder>> workerCustomizers, List<TemporalOptionsCustomizer<io.temporal.worker.WorkflowImplementationOptions.Builder>> workflowImplementationCustomizers) Deprecated.Use constructor with plugins parameterWorkersTemplate(NamespaceProperties namespaceProperties, ClientTemplate clientTemplate, List<io.temporal.common.interceptors.WorkerInterceptor> workerInterceptors, io.opentracing.Tracer tracer, TestWorkflowEnvironmentAdapter testWorkflowEnvironment, List<TemporalOptionsCustomizer<io.temporal.worker.WorkerFactoryOptions.Builder>> workerFactoryCustomizers, List<TemporalOptionsCustomizer<io.temporal.worker.WorkerOptions.Builder>> workerCustomizers, List<TemporalOptionsCustomizer<io.temporal.worker.WorkflowImplementationOptions.Builder>> workflowImplementationCustomizers, List<io.temporal.worker.WorkerPlugin> plugins) -
Method Summary
Modifier and TypeMethodDescriptionReturn information on registered workflow and activity types per task queueio.temporal.worker.WorkerFactoryCollection<io.temporal.worker.Worker> voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) voidsetEnvironment(org.springframework.core.env.Environment environment)
-
Constructor Details
-
WorkersTemplate
public WorkersTemplate(@Nonnull NamespaceProperties namespaceProperties, @Nullable ClientTemplate clientTemplate, @Nullable List<io.temporal.common.interceptors.WorkerInterceptor> workerInterceptors, @Nullable io.opentracing.Tracer tracer, @Nullable TestWorkflowEnvironmentAdapter testWorkflowEnvironment, @Nullable List<TemporalOptionsCustomizer<io.temporal.worker.WorkerFactoryOptions.Builder>> workerFactoryCustomizers, @Nullable List<TemporalOptionsCustomizer<io.temporal.worker.WorkerOptions.Builder>> workerCustomizers, @Nullable List<TemporalOptionsCustomizer<io.temporal.worker.WorkflowImplementationOptions.Builder>> workflowImplementationCustomizers, @Nullable List<io.temporal.worker.WorkerPlugin> plugins) -
WorkersTemplate
@Deprecated public WorkersTemplate(@Nonnull NamespaceProperties namespaceProperties, @Nullable ClientTemplate clientTemplate, @Nullable List<io.temporal.common.interceptors.WorkerInterceptor> workerInterceptors, @Nullable io.opentracing.Tracer tracer, @Nullable TestWorkflowEnvironmentAdapter testWorkflowEnvironment, @Nullable List<TemporalOptionsCustomizer<io.temporal.worker.WorkerFactoryOptions.Builder>> workerFactoryCustomizers, @Nullable List<TemporalOptionsCustomizer<io.temporal.worker.WorkerOptions.Builder>> workerCustomizers, @Nullable List<TemporalOptionsCustomizer<io.temporal.worker.WorkflowImplementationOptions.Builder>> workflowImplementationCustomizers) Deprecated.Use constructor with plugins parameter
-
-
Method Details
-
getNamespaceProperties
-
getWorkerFactory
public io.temporal.worker.WorkerFactory getWorkerFactory() -
getWorkers
-
getRegisteredInfo
Return information on registered workflow and activity types per task queue -
setBeanFactory
public void setBeanFactory(@Nonnull org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException - Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware- Throws:
org.springframework.beans.BeansException
-
setEnvironment
public void setEnvironment(@Nonnull org.springframework.core.env.Environment environment) - Specified by:
setEnvironmentin interfaceorg.springframework.context.EnvironmentAware
-