Interface CamelInternalProcessorAdvice<T>

Type Parameters:
T -

public interface CamelInternalProcessorAdvice<T>
An advice (before and after) to execute cross-cutting functionality in the Camel routing engine.

The Camel routing engine will execute the before(org.apache.camel.Exchange) and after(org.apache.camel.Exchange, Object) methods during routing in correct order.

See Also:
  • invalid reference
    org.apache.camel.impl.engine.CamelInternalProcessor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    after(Exchange exchange, T data)
    Callback executed after processing a step in the route.
    before(Exchange exchange)
    Callback executed before processing a step in the route.
    default boolean
    Whether this advice has state or not.
  • Method Details

    • before

      T before(Exchange exchange) throws Exception
      Callback executed before processing a step in the route.
      Parameters:
      exchange - the current exchange
      Returns:
      any state to keep and provide as data to the after(org.apache.camel.Exchange, Object) method, or use null for no state.
      Throws:
      Exception - is thrown if error during the call.
    • after

      void after(Exchange exchange, T data) throws Exception
      Callback executed after processing a step in the route.
      Parameters:
      exchange - the current exchange
      data - the state, if any, returned in the before(org.apache.camel.Exchange) method.
      Throws:
      Exception - is thrown if error during the call.
    • hasState

      default boolean hasState()
      Whether this advice has state or not.