Package org.apache.camel.spi
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 thebefore(org.apache.camel.Exchange)
andafter(org.apache.camel.Exchange, Object)
methods during routing in correct order.- See Also:
org.apache.camel.processor.CamelInternalProcessor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
after(Exchange exchange, T data)
Callback executed after processing a step in the route.T
before(Exchange exchange)
Callback executed before processing a step in the route.default boolean
hasState()
Whether this advice has state or not.
-
-
-
Method Detail
-
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 exchangedata
- the state, if any, returned in thebefore(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.
-
-