Interface ExtensibleConfigurer
- All Known Implementing Classes:
EventProcessorConfiguration,PooledStreamingEventProcessorConfiguration,SubscribingEventProcessorConfiguration
A configurer that supports registering
ConfigurationExtension instances.
Extensions are created eagerly when extend(Class, Supplier) is called — the factory is invoked immediately
and the result is stored. If extend() is called multiple times for the same type, the new instance always
replaces the previous one.
For reading extensions, see ExtendedConfiguration.
- Since:
- 5.1.0
- Author:
- Mateusz Nowak
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<T extends ConfigurationExtension<?>>
ExtensibleConfigurerRegisters an extension factory for the given type and returnsthisconfigurer for chaining.
-
Method Details
-
extend
<T extends ConfigurationExtension<?>> ExtensibleConfigurer extend(Class<T> extensionType, Supplier<T> factory) Registers an extension factory for the given type and returnsthisconfigurer for chaining.The factory is invoked immediately — the extension is created eagerly, not lazily. If called multiple times for the same type, the new instance always replaces the previous one.
Example:
config.extend(DeadLetterQueueConfiguration.class, () -> new DeadLetterQueueConfiguration().enabled().factory(myFactory)) .extend(MetricsExtension.class, () -> new MetricsExtension().enabled());- Type Parameters:
T- the extension type- Parameters:
extensionType- the extension classfactory- a supplier that returns a configured extension- Returns:
thisconfigurer, for fluent chaining
-