protected void initExchangePatternFromConnectorDefault(TransportServiceDescriptor serviceDescriptor) throws EndpointException { if (messageExchangePattern == null) { try { messageExchangePattern = serviceDescriptor.getDefaultExchangePattern(); } catch (TransportServiceException e) { throw new EndpointException(e); } } }
public void setAsText(String text) { try { setValue(new MuleEndpointURI(text, muleContext)); } catch (EndpointException e) { throw new IllegalArgumentException(e.getMessage()); } }
private TransportServiceDescriptor getConnectorServiceDescriptor() throws EndpointException { try { Connector conn = getConnector(); return getNonNullServiceDescriptor(conn); } catch (ServiceException e) { throw new EndpointException(e); } }
private void checkOutboundExchangePattern() throws EndpointException { TransportServiceDescriptor serviceDescriptor = getConnectorServiceDescriptor(); initExchangePatternFromConnectorDefault(serviceDescriptor); if (!serviceDescriptor.getOutboundExchangePatterns().contains(messageExchangePattern)) { throw new EndpointException(CoreMessages.exchangePatternForEndpointNotSupported( messageExchangePattern, "outbound", uriBuilder.getEndpoint())); } }
protected void checkInboundExchangePattern() throws EndpointException { TransportServiceDescriptor serviceDescriptor = getConnectorServiceDescriptor(); initExchangePatternFromConnectorDefault(serviceDescriptor); if (!serviceDescriptor.getInboundExchangePatterns().contains(messageExchangePattern)) { throw new EndpointException(CoreMessages.exchangePatternForEndpointNotSupported( messageExchangePattern, "inbound", uriBuilder.getEndpoint())); } }
@Override public OutboundEndpoint buildOutboundEndpoint() throws EndpointException, InitialisationException { LocalClientMessageProcessorBuilder builder = new LocalClientMessageProcessorBuilder(); builder.setMuleContext(muleContext); builder.setAddress(getEndpointBuilder().getEndpoint().toString()); try { ArrayList<MessageProcessor> processors = new ArrayList<MessageProcessor>(); processors.add(builder.build()); if (messageProcessors != null) { processors.addAll(messageProcessors); } messageProcessors = processors; } catch (Exception e) { throw new EndpointException(e); } return super.buildOutboundEndpoint(); }
public EndpointBuilder getEndpointBuilder(String uri) throws MuleException { logger.debug("DefaultEndpointFactory request for endpoint builder for uri: " + uri); EndpointBuilder endpointBuilder = lookupEndpointBuilder(uri); if (endpointBuilder != null) { try { endpointBuilder = (EndpointBuilder) endpointBuilder.clone(); } catch (Exception e) { throw new EndpointException(CoreMessages.failedToClone("global endpoint EndpointBuilder"), e); } } else { logger.debug("Named EndpointBuilder not found, creating endpoint builder for uri"); EndpointURI epURI = new MuleEndpointURI(uri, muleContext); TransportServiceDescriptor tsd = (TransportServiceDescriptor) muleContext.getRegistry().lookupServiceDescriptor(ServiceType.TRANSPORT, epURI.getFullScheme(), null); endpointBuilder = tsd.createEndpointBuilder(uri, muleContext); } return endpointBuilder; }
@Override public OutboundEndpoint buildOutboundEndpoint() throws EndpointException, InitialisationException { final WsdlClientMessageProcessorBuilder builder = new WsdlClientMessageProcessorBuilder(); builder.setMuleContext(muleContext); builder.setWsdlLocation(getEndpointBuilder().toString() + "?wsdl"); builder.setOperation(getOperation()); try { // List must be mutable as it gets cleared on Mule shutdown messageProcessors = new ArrayList<MessageProcessor>( Arrays.asList(new FlowConfiguringMessageProcessor(builder))); } catch (final Exception e) { throw new EndpointException(e); } return super.buildOutboundEndpoint(); }
if (uri == null) throw new EndpointException( HttpMessages.unableToGetEndpointUri(httpServletRequest.getRequestURI())); throw new EndpointException(e);
throw new EndpointException(CoreMessages.failedToStart("Quartz receiver"), e);