InstrumentationProcessor wrapper = new InstrumentationProcessor();
wrapper.setType("route");
wrapper.setProcessor(target);
// and create the route that wraps the UoW
Route edcr = new EventDrivenConsumerRoute(this, getEndpoint(), wrapper);
edcr.getProperties().put(Route.ID_PROPERTY, route.idOrCreate(getCamelContext().getNodeIdFactory()));
edcr.getProperties().put(Route.PARENT_PROPERTY, Integer.toHexString(route.hashCode()));
if (route.getGroup() != null) {
edcr.getProperties().put(Route.GROUP_PROPERTY, route.getGroup());
}
// after the route is created then set the route on the policy processor so we get hold of it
if (routePolicyProcessor != null) {
routePolicyProcessor.setRoute(edcr);