@Override public EndpointBuilder getEndpointBuilder(String uri) throws MuleException { return defaultFactory.getEndpointBuilder(uri); }
public OutboundEndpoint load(String key) throws Exception { EndpointFactory endpointFactory = muleContext.getEndpointFactory(); EndpointBuilder endpointBuilder = endpointFactory.getEndpointBuilder(key); return endpointFactory.getOutboundEndpoint(endpointBuilder); } };
protected OutboundEndpoint getOutboundEndpoint(String uri) throws MuleException { EndpointFactory factory = muleContext.getEndpointFactory(); EndpointBuilder endpointBuilder = factory.getEndpointBuilder(uri); endpointBuilder.setExchangePattern(MessageExchangePattern.ONE_WAY); return factory.getOutboundEndpoint(endpointBuilder); } }
protected OutboundEndpoint getOutboundEndpoint(String uri, MessageExchangePattern exchangePattern, Integer responseTimeout) throws MuleException { // There was a potential leak here between get() and putIfAbsent(). This // would cause the endpoint that was created to be used rather an endpoint // with the same key that has been created and put in the cache by another // thread. To avoid this we test for the result of putIfAbsent result and if // it is non-null then an endpoint was created and added concurrently and we // return this instance instead. String key = String.format("%1s:%2s:%3s", uri, exchangePattern, responseTimeout); OutboundEndpoint endpoint = outboundEndpointCache.get(key); if (endpoint == null) { EndpointBuilder endpointBuilder = muleContext.getEndpointFactory().getEndpointBuilder(uri); endpointBuilder.setExchangePattern(exchangePattern); if (responseTimeout != null && responseTimeout > 0) { endpointBuilder.setResponseTimeout(responseTimeout.intValue()); } endpoint = muleContext.getEndpointFactory().getOutboundEndpoint(endpointBuilder); OutboundEndpoint concurrentlyAddedEndpoint = outboundEndpointCache.putIfAbsent(key, endpoint); if (concurrentlyAddedEndpoint != null) { return concurrentlyAddedEndpoint; } } return endpoint; }
@Override public InboundEndpoint getInboundEndpoint(String uri, MessageExchangePattern mep) throws MuleException { String key = uri + ":" + mep.toString(); InboundEndpoint endpoint = inboundEndpointCache.get(key); if (endpoint == null) { EndpointBuilder endpointBuilder = muleContext.getEndpointFactory() .getEndpointBuilder(uri); endpointBuilder.setExchangePattern(mep); endpoint = muleContext.getEndpointFactory().getInboundEndpoint(endpointBuilder); InboundEndpoint concurrentlyAddedEndpoint = inboundEndpointCache.putIfAbsent(key, endpoint); if (concurrentlyAddedEndpoint != null) { return concurrentlyAddedEndpoint; } } return endpoint; } }
protected EndpointBuilder getEndpointBuilder(AnnotatedEndpointData epData) throws MuleException { String uri = parsePlaceholderValues(epData.getAddress()); EndpointBuilder endpointBuilder = muleContext.getEndpointFactory().getEndpointBuilder(uri); endpointBuilder.setMuleContext(muleContext); return endpointBuilder; }
@Override public OutboundEndpoint getOutboundEndpoint(String uri, MessageExchangePattern mep, Long responseTimeout) throws MuleException { String key = uri + ":" + mep.toString() + ":" + responseTimeout; OutboundEndpoint endpoint = outboundEndpointCache.get(key); if (endpoint == null) { EndpointBuilder endpointBuilder = muleContext.getEndpointFactory() .getEndpointBuilder(uri); endpointBuilder.setExchangePattern(mep); if (responseTimeout != null && responseTimeout > 0) { endpointBuilder.setResponseTimeout(responseTimeout.intValue()); } endpoint = muleContext.getEndpointFactory().getOutboundEndpoint(endpointBuilder); OutboundEndpoint concurrentlyAddedEndpoint = outboundEndpointCache.putIfAbsent(key, endpoint); if (concurrentlyAddedEndpoint != null) { return concurrentlyAddedEndpoint; } } return endpoint; }
private OutboundEndpoint createOutboundEndpoint() throws MuleException { EndpointBuilder builder = muleContext.getEndpointFactory().getEndpointBuilder(serviceAddress); if (connector != null) { String protocol = new MuleEndpointURI(serviceAddress, muleContext).getScheme(); if (!connector.supportsProtocol(protocol)) { throw new IllegalStateException(String.format("Connector %s does not support protocol: %s", connector.getName(), protocol)); } builder.setConnector(connector); } return muleContext.getEndpointFactory().getOutboundEndpoint(builder); }
protected InboundEndpoint getOrBuildInboundEndpoint(MuleContext muleContext) throws MuleException { if (inboundEndpoint != null) { return inboundEndpoint; } if (inboundEndpointBuilder == null) { inboundEndpointBuilder = muleContext.getEndpointFactory().getEndpointBuilder(inboundAddress); } inboundEndpointBuilder.setExchangePattern(getInboundMessageExchangePattern()); doConfigureInboundEndpointBuilder(muleContext, inboundEndpointBuilder); return inboundEndpointBuilder.buildInboundEndpoint(); }
protected OutboundEndpoint getOrBuildOutboundEndpoint(MuleContext muleContext) throws MuleException { if (outboundEndpoint != null) { return outboundEndpoint; } if (outboundEndpointBuilder == null) { outboundEndpointBuilder = muleContext.getEndpointFactory().getEndpointBuilder(outboundAddress); } outboundEndpointBuilder.setExchangePattern(getOutboundMessageExchangePattern()); doConfigureOutboundEndpointBuilder(muleContext, outboundEndpointBuilder); return outboundEndpointBuilder.buildOutboundEndpoint(); }
private static EndpointBuilder createInboundBuilder(MuleContext context, AnnotatedEndpointData epData) { try { EndpointBuilder builder = context.getEndpointFactory().getEndpointBuilder("dynamic://null"); builder.setExchangePattern(epData.getMep()); builder.setConnector(epData.getConnector()); builder.setName(epData.getName()); builder.setProperties(epData.getProperties() == null ? new HashMap() : epData.getProperties()); return builder; } catch (MuleException e) { throw new RuntimeException(e); } }
protected RemoteDispatcher(String endpoint, MuleContext muleContext) throws MuleException { this.muleContext = muleContext; serializer = muleContext.getObjectSerializer(); EndpointFactory endpointFactory = muleContext.getEndpointFactory(); asyncServerEndpoint = endpointFactory.getOutboundEndpoint(endpoint); EndpointBuilder endpointBuilder = endpointFactory.getEndpointBuilder(endpoint); endpointBuilder.setExchangePattern(MessageExchangePattern.REQUEST_RESPONSE); syncServerEndpoint = muleContext.getEndpointFactory().getOutboundEndpoint( endpointBuilder); wireFormat = requestWireFormat(); }
public ScheduleConfigBuilder(String scheduleId, MuleContext muleContext) throws MuleException { super(); this.scheduleId = scheduleId; endpointBuilder = muleContext.getEndpointFactory().getEndpointBuilder("quartz://" + scheduleId); endpointBuilder.setMuleContext(muleContext); endpointBuilder.setName(scheduleId); connector = new QuartzConnector(muleContext); connector.setName(scheduleId); endpointBuilder.setConnector(connector); endpointBuilder.setExchangePattern(MessageExchangePattern.ONE_WAY); }
protected OutboundEndpoint buildOutboundEndpoint(String recipient) throws MuleException { EndpointBuilder endpointBuilder = getMuleContext().getEndpointFactory().getEndpointBuilder(recipient); try { endpointBuilder = (EndpointBuilder) endpointBuilder.clone(); endpointBuilder.setTransactionConfig(transactionConfig); if (synchronous != null && synchronous) { endpointBuilder.setExchangePattern(MessageExchangePattern.REQUEST_RESPONSE); } } catch (CloneNotSupportedException e) { throw new DefaultMuleException(e); } return endpointBuilder.buildOutboundEndpoint(); }
EndpointBuilder builder = context.getEndpointFactory().getEndpointBuilder(address); builder.setConnector(cnn); builder.setName(epData.getName());
EndpointBuilder endpointBuilder = endpointFactory.getEndpointBuilder(action.getResourceIdentifier()); endpointBuilder.setExchangePattern(MessageExchangePattern.REQUEST_RESPONSE);
EndpointBuilder endpointBuilder = flowConstruct.getMuleContext().getRegistry().lookupEndpointFactory().getEndpointBuilder(endpoint); endpointBuilder.setExchangePattern(exchangePattern); OutboundEndpoint ep = endpointBuilder.buildOutboundEndpoint();
EndpointBuilder endpointBuilder = connector.getMuleContext().getRegistry().lookupEndpointFactory().getEndpointBuilder(endpoint); endpointBuilder.setExchangePattern(exchangePattern); OutboundEndpoint ep = endpointBuilder.buildOutboundEndpoint();
EndpointBuilder endpointBuilder = muleContext.getEndpointFactory().getEndpointBuilder(endpoint); endpointBuilder.setExchangePattern(exchangePattern); OutboundEndpoint ep = endpointBuilder.buildOutboundEndpoint();
EndpointBuilder endpointBuilder = endpointFactory.getEndpointBuilder(subscription); endpointBuilder.setExchangePattern(MessageExchangePattern.fromSyncFlag(!asynchronous)); InboundEndpoint endpoint = endpointFactory.getInboundEndpoint(endpointBuilder);