Interface InvokeOnHeaderStrategy


  • public interface InvokeOnHeaderStrategy
    Pluggable strategy for invoking InvokeOnHeader.

    Camel provides source code generated strategies via the camel maven tooling.

    See Also:
    InvokeOnHeader
    • Method Detail

      • invoke

        Object invoke​(Object target,
                      String key,
                      Exchange exchange,
                      AsyncCallback callback)
               throws Exception
        Invoke the method based on the header key
        Parameters:
        target - the target such as a producer extending HeaderSelectorProducer
        key - the header key
        exchange - the exchange
        callback - the async callback
        Returns:
        option response from invoking the method, or null if the method is void if a value is returned, then this value is stored as result on the message body.
        Throws:
        Exception - is thrown if error invoking the method.