if (internalDispatch(exchange, endpoint, true)) {
return;
}
}
if (!match) {
throw new ServiceMixException("Could not dispatch exchange. No matching endpoints.");
} else if (!securityMatch) {
throw new ServiceMixException("User not authenticated or not authorized to access any matching endpoint.");
} else {
throw new ServiceMixException("Could not dispatch exchange. No flow can handle it.");
}
} else {
if (!internalDispatch(exchange, exchange.getDestination(), false)) {
throw new ServiceMixException("Could not dispatch exchange. No flow can handle it.");
}
}
} else {
if (!internalDispatch(exchange, exchange.getSource(), false)) {
throw new ServiceMixException("Could not dispatch exchange. No flow can handle it.");
}
}
}