public static Endpoint getEndpoint(DestinationFactory df, String uri) throws IOException, EndpointNotFoundException { int idx = uri.indexOf('?'); if (idx != -1) { uri = uri.substring(0, idx); } EndpointInfo ei = new EndpointInfo(); ei.setAddress(uri); Destination d = df.getDestination(ei); if (d.getMessageObserver() == null) { // TODO is this the right Mule exception? throw new EndpointNotFoundException(uri); } MessageObserver mo = d.getMessageObserver(); if (!(mo instanceof ChainInitiationObserver)) { throw new EndpointNotFoundException(uri); } ChainInitiationObserver co = (ChainInitiationObserver) mo; return co.getEndpoint(); }
throw new EndpointNotFoundException(CoreMessages.endpointNotFound(endpointName), e);
if (processor == null) throw new EndpointNotFoundException( CoreMessages.noOutboundRouterSetOn(flowConstruct.getName()));