Package org.apache.camel.spi
Interface DataFormatCustomizer
- 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.
To apply custom configurations to
DataFormat instances.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classDataFormatCustomizer.Builder<T extends DataFormat>A fluent builder to create aDataFormatCustomizerinstance.static interfaceUsed as additional filer mechanism to control if customizers need to be applied or not. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create a genericDataFormatCustomizer.Builder.static <T extends DataFormat>
DataFormatCustomizer.Builder<T> Create a typedDataFormatCustomizer.Builderthat can process a concrete data format type instance.voidconfigure(String name, DataFormat target) Customize the specifiedDataFormat.static <T extends DataFormat>
DataFormatCustomizerCreate aDataFormatCustomizerthat can process a concrete data format type instance.default intgetOrder()Gets the order.default booleanisEnabled(String name, DataFormat target) Checks whether this customizer should be applied to the givenDataFormat.
-
Method Details
-
builder
Create a genericDataFormatCustomizer.Builder.- Returns:
- the
DataFormatCustomizer.Builder
-
builder
Create a typedDataFormatCustomizer.Builderthat can process a concrete data format type instance.- Parameters:
type- the concrete type of theComponent- Returns:
- the
ComponentCustomizer.Builder
-
forType
static <T extends DataFormat> DataFormatCustomizer forType(Class<T> type, org.apache.camel.util.function.ThrowingConsumer<T, Exception> consumer) Create aDataFormatCustomizerthat can process a concrete data format type instance.- Parameters:
type- the concrete type of theDataFormatconsumer- theDataFormatconfiguration logic- Returns:
- the
DataFormatCustomizer
-
configure
Customize the specifiedDataFormat.- Parameters:
name- the unique name of the data formattarget- the data format to configure
-
isEnabled
Checks whether this customizer should be applied to the givenDataFormat.- Parameters:
name- the unique name of the data formattarget- the data format to configure- Returns:
- true if the customizer should be applied
-
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.
-