Search in sources :

Example 1 with InvokeOnHeaders

use of org.apache.camel.InvokeOnHeaders in project camel by apache.

the class HeaderSelectorProducer method doStart.

@Override
protected void doStart() throws Exception {
    for (final Method method : target.getClass().getDeclaredMethods()) {
        InvokeOnHeaders annotation = method.getAnnotation(InvokeOnHeaders.class);
        if (annotation != null) {
            for (InvokeOnHeader processor : annotation.value()) {
                bind(processor, method);
            }
        } else {
            bind(method.getAnnotation(InvokeOnHeader.class), method);
        }
    }
    handlers = Collections.unmodifiableMap(handlers);
    super.doStart();
}
Also used : InvokeOnHeaders(org.apache.camel.InvokeOnHeaders) InvokeOnHeader(org.apache.camel.InvokeOnHeader) Method(java.lang.reflect.Method)

Aggregations

Method (java.lang.reflect.Method)1 InvokeOnHeader (org.apache.camel.InvokeOnHeader)1 InvokeOnHeaders (org.apache.camel.InvokeOnHeaders)1