@FunctionalInterface public interface ComponentCustomizer extends Ordered
Component
instances.Modifier and Type | Interface and Description |
---|---|
static class |
ComponentCustomizer.Builder<T extends Component>
A fluent builder to create a
ComponentCustomizer instance. |
static interface |
ComponentCustomizer.Policy
Used as additional filer mechanism to control if customizers need to be applied or not.
|
Modifier and Type | Method and Description |
---|---|
static ComponentCustomizer.Builder<Component> |
builder()
Create a generic
ComponentCustomizer.Builder . |
static <T extends Component> |
builder(Class<T> type)
Create a typed
ComponentCustomizer.Builder that can process a concrete component type instance. |
void |
configure(String name,
Component target)
Customize the specified
Component . |
static <T extends Component> |
forType(Class<T> type,
org.apache.camel.util.function.ThrowingConsumer<T,Exception> consumer)
Create a
ComponentCustomizer that can process a concrete component type instance. |
default int |
getOrder()
Gets the order.
|
default boolean |
isEnabled(String name,
Component target)
Checks whether this customizer should be applied to the given
Component . |
static ComponentCustomizer.Builder<Component> builder()
ComponentCustomizer.Builder
.ComponentCustomizer.Builder
static <T extends Component> ComponentCustomizer.Builder<T> builder(Class<T> type)
ComponentCustomizer.Builder
that can process a concrete component type instance.type
- the concrete type of the Component
ComponentCustomizer.Builder
static <T extends Component> ComponentCustomizer forType(Class<T> type, org.apache.camel.util.function.ThrowingConsumer<T,Exception> consumer)
ComponentCustomizer
that can process a concrete component type instance.type
- the concrete type of the Component
consumer
- the Component
configuration logicComponentCustomizer
void configure(String name, Component target)
Component
.name
- the unique name of the componenttarget
- the component to configuredefault boolean isEnabled(String name, Component target)
Component
.name
- the unique name of the componenttarget
- the component to configuredefault int getOrder()
Ordered
Integer.MAX_VALUE
or eg Ordered.LOWEST
.Apache Camel