public class DefaultInstrumentationProcessor extends org.apache.camel.support.processor.DelegateAsyncProcessor implements org.apache.camel.spi.ManagementInterceptStrategy.InstrumentationProcessor<org.apache.camel.util.StopWatch>, org.apache.camel.Ordered
ManagedCounter
for instrumenting
processing of exchanges.
This implementation has been optimised to work in dual mode, either as an advice or as a processor.
The former is faster and the latter is required when the error handler has been configured with redelivery enabled.Constructor and Description |
---|
DefaultInstrumentationProcessor(String type) |
DefaultInstrumentationProcessor(String type,
org.apache.camel.Processor processor) |
Modifier and Type | Method and Description |
---|---|
void |
after(org.apache.camel.Exchange exchange,
org.apache.camel.util.StopWatch watch) |
org.apache.camel.util.StopWatch |
before(org.apache.camel.Exchange exchange) |
protected void |
beginTime(org.apache.camel.Exchange exchange) |
int |
getOrder() |
String |
getType() |
boolean |
process(org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback) |
protected void |
recordTime(org.apache.camel.Exchange exchange,
long duration) |
void |
setCounter(Object counter) |
void |
setType(String type) |
String |
toString() |
doShutdown, doStart, doStop, getProcessor, hasNext, next, setProcessor, setProcessor
build, doBuild, doInit, doResume, doSuspend, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public DefaultInstrumentationProcessor(String type, org.apache.camel.Processor processor)
public DefaultInstrumentationProcessor(String type)
public void setCounter(Object counter)
setCounter
in interface org.apache.camel.spi.ManagementInterceptStrategy.InstrumentationProcessor<org.apache.camel.util.StopWatch>
public boolean process(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback)
process
in interface org.apache.camel.AsyncProcessor
process
in class org.apache.camel.support.processor.DelegateAsyncProcessor
protected void beginTime(org.apache.camel.Exchange exchange)
protected void recordTime(org.apache.camel.Exchange exchange, long duration)
public org.apache.camel.util.StopWatch before(org.apache.camel.Exchange exchange)
before
in interface org.apache.camel.spi.ManagementInterceptStrategy.InstrumentationProcessor<org.apache.camel.util.StopWatch>
public void after(org.apache.camel.Exchange exchange, org.apache.camel.util.StopWatch watch)
after
in interface org.apache.camel.spi.ManagementInterceptStrategy.InstrumentationProcessor<org.apache.camel.util.StopWatch>
public String toString()
toString
in class org.apache.camel.support.processor.DelegateAsyncProcessor
public int getOrder()
getOrder
in interface org.apache.camel.Ordered
Apache Camel