objectName = getManagementNamingStrategy().getObjectNameForErrorHandler(meh.getRouteContext(), meh.getErrorHandler(), meh.getErrorHandlerBuilder());
} else if (managedObject instanceof ManagedProcessor) {
ManagedProcessor mp = (ManagedProcessor) managedObject;
objectName = getManagementNamingStrategy().getObjectNameForProcessor(mp.getContext(), mp.getProcessor(), mp.getDefinition());
} else if (managedObject instanceof ManagedConsumer) {
ManagedConsumer ms = (ManagedConsumer) managedObject;
objectName = getManagementNamingStrategy().getObjectNameForConsumer(ms.getContext(), ms.getConsumer());
} else if (managedObject instanceof ManagedProducer) {
ManagedProducer ms = (ManagedProducer) managedObject;
objectName = getManagementNamingStrategy().getObjectNameForProducer(ms.getContext(), ms.getProducer());
} else if (managedObject instanceof ManagedTracer) {
ManagedTracer mt = (ManagedTracer) managedObject;
objectName = getManagementNamingStrategy().getObjectNameForTracer(mt.getContext(), mt.getTracer());
} else if (managedObject instanceof ManagedEventNotifier) {
ManagedEventNotifier men = (ManagedEventNotifier) managedObject;
objectName = getManagementNamingStrategy().getObjectNameForEventNotifier(men.getContext(), men.getEventNotifier());
} else if (managedObject instanceof ManagedThreadPool) {
ManagedThreadPool mes = (ManagedThreadPool) managedObject;
objectName = getManagementNamingStrategy().getObjectNameForThreadPool(mes.getContext(), mes.getThreadPool(), mes.getId(), mes.getSourceId());
} else if (managedObject instanceof ManagedService) {
// check for managed service should be last
ManagedService ms = (ManagedService) managedObject;
// skip endpoints as they are already managed
if (ms.getService() instanceof Endpoint) {
return null;
}
objectName = getManagementNamingStrategy().getObjectNameForService(ms.getContext(), ms.getService());
}
return nameType.cast(objectName);
}