Interface WorkflowServiceStubsPlugin


public interface WorkflowServiceStubsPlugin
Plugin interface for customizing Temporal workflow service stubs configuration and connection.

This is a low-level plugin interface for configuring the gRPC connection to the Temporal server. For most use cases, use WorkflowClientPlugin or WorkerPlugin in the temporal-sdk module instead.

Plugins that implement both WorkflowServiceStubsPlugin and WorkflowClientPlugin are automatically propagated from the service stubs to the workflow client.

  • Method Details

    • getName

      @Nonnull String getName()
      Returns a unique name for this plugin. Used for logging and duplicate detection. Recommended format: "organization.plugin-name" (e.g., "io.temporal.tracing")
      Returns:
      fully qualified plugin name
    • configureServiceStubs

      void configureServiceStubs(@Nonnull WorkflowServiceStubsOptions.Builder builder)
      Allows the plugin to modify service stubs options before the service stubs are created.
      Parameters:
      builder - the options builder to modify
    • connectServiceClient

      @Nonnull WorkflowServiceStubs connectServiceClient(@Nonnull WorkflowServiceStubsOptions options, @Nonnull Supplier<WorkflowServiceStubs> next)
      Allows the plugin to wrap service client connection.
      Parameters:
      options - the final options being used for connection
      next - supplier that creates the service stubs (calls next plugin or actual connection)
      Returns:
      the service stubs (possibly wrapped or decorated)