Class PluginUtils
java.lang.Object
io.temporal.internal.common.PluginUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T[]mergePlugins(T[] propagated, T[] explicit, Function<T, String> nameExtractor, org.slf4j.Logger log, String propagatedSource, Class<T> pluginClass) Merges propagated plugins with explicitly specified plugins.
-
Method Details
-
mergePlugins
public static <T> T[] mergePlugins(@Nullable T[] propagated, @Nullable T[] explicit, Function<T, String> nameExtractor, org.slf4j.Logger log, String propagatedSource, Class<T> pluginClass) Merges propagated plugins with explicitly specified plugins. Propagated plugins come first, followed by explicit plugins. Warns about duplicate plugin instances.- Type Parameters:
T- the plugin type- Parameters:
propagated- plugins propagated from a parent component (may be null or empty)explicit- plugins explicitly specified on this component (may be null or empty)nameExtractor- function to extract plugin name for logginglog- logger for duplicate warningspropagatedSource- description of where propagated plugins come from (e.g., "service stubs", "client")- Returns:
- merged array of plugins, never null
-