public static class CamelInternalProcessor.InstrumentationAdvice extends Object implements CamelInternalProcessorAdvice<StopWatch>
Constructor and Description |
---|
CamelInternalProcessor.InstrumentationAdvice(String type) |
Modifier and Type | Method and Description |
---|---|
void |
after(Exchange exchange,
StopWatch watch)
Callback executed after processing a step in the route.
|
StopWatch |
before(Exchange exchange)
Callback executed before processing a step in the route.
|
protected void |
beginTime(Exchange exchange) |
String |
getType() |
protected void |
recordTime(Exchange exchange,
long duration) |
void |
setCounter(Object counter) |
void |
setType(String type) |
public CamelInternalProcessor.InstrumentationAdvice(String type)
public void setCounter(Object counter)
protected void beginTime(Exchange exchange)
protected void recordTime(Exchange exchange, long duration)
public String getType()
public void setType(String type)
public StopWatch before(Exchange exchange) throws Exception
CamelInternalProcessorAdvice
before
in interface CamelInternalProcessorAdvice<StopWatch>
exchange
- the current exchangeCamelInternalProcessorAdvice.after(org.apache.camel.Exchange, Object)
method, or use null for no state.Exception
- is thrown if error during the call.public void after(Exchange exchange, StopWatch watch) throws Exception
CamelInternalProcessorAdvice
after
in interface CamelInternalProcessorAdvice<StopWatch>
exchange
- the current exchangewatch
- the state, if any, returned in the CamelInternalProcessorAdvice.before(org.apache.camel.Exchange)
method.Exception
- is thrown if error during the call.Apache Camel