Interface LanguageCustomizer
- All Superinterfaces:
Ordered
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Strategy for applying custom configuration to
Language instances as they are created.
Customizers are discovered from the Registry and applied to each language during bootstrap, with
isEnabled(String, Language) (and an optional LanguageCustomizer.Policy) deciding whether a given language is
customized, and Ordered controlling the order. Use the builder() /
forType(Class, ThrowingConsumer) helpers to target a concrete language type. This is the language-level
counterpart to CamelContextCustomizer.
See CamelContext auto-configuration in
the Camel user manual.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classLanguageCustomizer.Builder<T extends Language>A fluent builder to create aLanguageCustomizerinstance.static interfaceUsed as additional filer mechanism to control if customizers need to be applied or not. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LanguageCustomizer.Builder<Language> builder()Create a genericLanguageCustomizer.Builder.static <T extends Language>
LanguageCustomizer.Builder<T> Create a typedLanguageCustomizer.Builderthat can process a concrete language type instance.voidCustomize the specifiedLanguage.static <T extends Language>
LanguageCustomizerCreate aDataFormatCustomizerthat can process a concrete language type instance.default intgetOrder()Gets the order.default booleanChecks whether this customizer should be applied to the givenLanguage.
-
Method Details
-
builder
Create a genericLanguageCustomizer.Builder.- Returns:
- the
LanguageCustomizer.Builder
-
builder
Create a typedLanguageCustomizer.Builderthat can process a concrete language type instance.- Parameters:
type- the concrete type of theComponent- Returns:
- the
ComponentCustomizer.Builder
-
forType
static <T extends Language> LanguageCustomizer forType(Class<T> type, org.apache.camel.util.function.ThrowingConsumer<T, Exception> consumer) Create aDataFormatCustomizerthat can process a concrete language type instance.- Parameters:
type- the concrete type of theLanguageconsumer- theLanguageconfiguration logic- Returns:
- the
LanguageCustomizer
-
configure
-
isEnabled
-
getOrder
default int getOrder()Description copied from interface:OrderedGets the order. Use low numbers for higher priority. Normally the sorting will start from 0 and move upwards. So if you want to be last then useInteger.MAX_VALUEor egOrdered.LOWEST.
-