Interface WorkerOptionsCustomizer

All Superinterfaces:
TemporalOptionsCustomizer<io.temporal.worker.WorkerOptions.Builder>

public interface WorkerOptionsCustomizer extends TemporalOptionsCustomizer<io.temporal.worker.WorkerOptions.Builder>
Bean of this class can be added to Spring context to get a fine control over WorkerOptions objects that are created by Temporal Spring Boot Autoconfigure module.

Only one bean of this or TemporalOptionsCustomizer<WorkerOptions.Builder> type can be added to Spring context.

  • Method Summary

    Modifier and Type
    Method
    Description
    default io.temporal.worker.WorkerOptions.Builder
    customize(io.temporal.worker.WorkerOptions.Builder optionsBuilder)
    This method can modify some fields of the provided builder or create a new builder altogether and return it back to be used.
    io.temporal.worker.WorkerOptions.Builder
    customize(io.temporal.worker.WorkerOptions.Builder optionsBuilder, String workerName, String taskQueue)
    This method can modify some fields of the provided WorkerOptions.Builder or create a new builder altogether and return it back to be used.
  • Method Details

    • customize

      @Nonnull default io.temporal.worker.WorkerOptions.Builder customize(@Nonnull io.temporal.worker.WorkerOptions.Builder optionsBuilder)
      Description copied from interface: TemporalOptionsCustomizer
      This method can modify some fields of the provided builder or create a new builder altogether and return it back to be used. This method is called after the *Options.Builder is initialized by the Temporal Spring Boot module, so changes done by this method will override Spring Boot configuration values.
      Specified by:
      customize in interface TemporalOptionsCustomizer<io.temporal.worker.WorkerOptions.Builder>
      Parameters:
      optionsBuilder - *Options.Builder to customize
      Returns:
      modified optionsBuilder or a new builder to be used by the caller code.
    • customize

      @Nonnull io.temporal.worker.WorkerOptions.Builder customize(@Nonnull io.temporal.worker.WorkerOptions.Builder optionsBuilder, @Nonnull String workerName, @Nonnull String taskQueue)
      This method can modify some fields of the provided WorkerOptions.Builder or create a new builder altogether and return it back to be used. This method is called after the WorkerOptions.Builder is initialized by the Temporal Spring Boot module, so changes done by this method will override Spring Boot configuration values.
      Parameters:
      optionsBuilder - *Options.Builder to customize
      workerName - name of a Worker that will be created using the WorkerOptions produced by this call
      taskQueue - Task Queue of a Worker that will be created using the WorkerOptions produced by this call
      Returns:
      modified optionsBuilder or a new builder instance to be used by the caller code