use of org.apache.camel.component.knative.http.KnativeHttpConsumerFactory in project camel-k-runtime by apache.
the class KnativeConsumerRecorder method createKnativeConsumerFactoryCustomizer.
public RuntimeValue<ComponentCustomizer> createKnativeConsumerFactoryCustomizer(RuntimeValue<Router> router) {
KnativeHttpConsumerFactory factory = new KnativeHttpConsumerFactory();
factory.setRouter(router.getValue());
ComponentCustomizer cf = new ComponentCustomizer() {
@Override
public void configure(String name, Component target) {
if (target instanceof KnativeComponent) {
((KnativeComponent) target).setConsumerFactory(factory);
}
}
};
return new RuntimeValue<>(cf);
}
Aggregations