Interface WorkflowClientPlugin
- All Known Implementing Classes:
SimplePlugin
Plugin interface for customizing Temporal workflow client configuration.
This interface is separate from WorkflowServiceStubsPlugin
to allow plugins that only need to configure the workflow client without affecting the underlying
gRPC connection.
Plugins that implement both ServiceStubsPlugin and WorkflowClientPlugin will
have their service stubs configuration applied when creating the service stubs, and their client
configuration applied when creating the workflow client.
Plugins that also implement WorkerPlugin are automatically
propagated from the client to workers created from that client.
Example implementation:
public class LoggingPlugin extends SimplePlugin {
public LoggingPlugin() {
super("my-org.logging");
}
@Override
public void configureClient(WorkflowClientOptions.Builder builder) {
// Add custom interceptor
builder.setInterceptors(new LoggingInterceptor());
}
}
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidAllows the plugin to modify workflow client options before the client is created.getName()Returns a unique name for this plugin.
-
Method Details
-
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
-
configureWorkflowClient
Allows the plugin to modify workflow client options before the client is created. Called during configuration phase in forward (registration) order.- Parameters:
builder- the options builder to modify
-