Package org.apache.camel.spi
Annotation Type InvokeOnHeader
-
@Retention(RUNTIME) @Target(METHOD) public @interface InvokeOnHeader
Marks a method as being invoked for a specific header value. The method can either be executed synchronously or asynchronously (withAsyncCallback
. A method is only asynchronously executed if the method hasAsyncCallback
as a parameter. In this situation then the method should not return a value (void). And its the responsible of the method to invokecallback.done(false)
when to continue routing. Synchronous methods can either be void or return a value. If a value is returned then the value will be set as the response body. The method accepts the following parameters:- Exchange - the current exchange
- Message - the current message
- CamelContext - the camel context
- AsyncCallback - for asynchronous processing
- Object - Object or any other type is regarded as the current message body, converted to the given type
- See Also:
Message.getHeader(String)
-
-
Element Detail
-
value
String value
Name of header.
-
-