try {
// TODO we should add trace messages for a specific route ID to the
// all routes
Object tracer = getTracer();
if (tracer instanceof ManagedBacklogTracerMBean) {
ManagedBacklogTracerMBean camelTracer = (ManagedBacklogTracerMBean)tracer;
if (camelTracer != null) {
List<BacklogTracerEventMessage> traceMessages = null;
if (id == null) {
traceMessages = camelTracer.dumpAllTracedMessages();
} else {
traceMessages = camelTracer.dumpTracedMessages(id);
}
traceList.addBackLogTraceMessages(traceMessages);
} else {
// TODO should we highlight in the UI that there's no tracer enabled?
}