@Override public Producer createProducer() throws Exception { return delegate.createProducer(); }
producer = endpoint.createProducer();
public CamelMessageProducer(CamelDestination destination, Endpoint endpoint, ActiveMQSession session) throws JMSException { super(session); this.destination = destination; this.endpoint = endpoint; try { this.producer = endpoint.createProducer(); } catch (JMSException e) { throw e; } catch (Exception e) { throw JMSExceptionSupport.create(e); } }
public CamelMessageProducer(CamelDestination destination, Endpoint endpoint, ActiveMQSession session) throws JMSException { super(session); this.destination = destination; this.endpoint = endpoint; try { this.producer = endpoint.createProducer(); } catch (JMSException e) { throw e; } catch (Exception e) { throw JMSExceptionSupport.create(e); } }
@Override public Producer createProducer() throws Exception { return getChildEndpoint().createProducer(); }
/** * Sets URI of the endpoint that processes replay errors. * * @param replayErrorUri * URI of error endpoint. * @return this processor. */ public FlowBeginProcessor replayErrorHandler(String replayErrorUri) throws Exception { if (replayErrorUri != null) { replayErrorProcessor = resolveReplayErrorEndpoint(replayErrorUri).createProducer(); } return this; }
@Override public Producer createProducer() throws Exception { return getChildEndpoint().createProducer(); }
Producer createProducerFor(final Swagger swagger, final Operation operation, final String method, final String uriTemplate) throws Exception { final String basePath = determineBasePath(swagger); final StringBuilder componentEndpointUri = new StringBuilder(200).append("rest:").append(method).append(":") .append(basePath).append(":").append(uriTemplate); final CamelContext camelContext = getCamelContext(); final Endpoint endpoint = camelContext.getEndpoint(componentEndpointUri.toString()); setProperties(endpoint, determineEndpointParameters(swagger, operation)); return endpoint.createProducer(); }
protected AsyncProcessor createCamelProcessor(Endpoint camelEndpoint) { AsyncProcessor processor = null; try { processor = new UnitOfWorkProcessor(camelEndpoint.createProducer()); } catch (Exception e) { throw new FailedToCreateProducerException(camelEndpoint, e); } return processor; }
public Producer createProducer() throws Exception { return getCamelContext().getEndpoint(child).createProducer(); }
public Producer createProducer() throws Exception { return getCamelContext().getEndpoint(child).createProducer(); }
@Override protected void doStart() throws Exception { jsonMarshalEndpoint = getCamelContext().getEndpoint("dataformat:json-jackson:marshal"); Objects.requireNonNull(jsonMarshalEndpoint, "jsonMarshalEndpoint"); jsonMarshalProducer = jsonMarshalEndpoint.createProducer(); Objects.requireNonNull(jsonMarshalProducer, "jsonMarshalProducer"); ServiceHelper.startServices(jsonMarshalEndpoint, jsonMarshalProducer); super.doStart(); }
@Override protected void doStart() throws Exception { jsonMarshalEndpoint = getCamelContext().getEndpoint("dataformat:json-jackson:marshal"); Objects.requireNonNull(jsonMarshalEndpoint, "jsonMarshalEndpoint"); jsonMarshalProducer = jsonMarshalEndpoint.createProducer(); Objects.requireNonNull(jsonMarshalProducer, "jsonMarshalProducer"); ServiceHelper.startServices(jsonMarshalEndpoint, jsonMarshalProducer); super.doStart(); }
private Validation createValidationProcessor(RouteContext routeContext) throws Exception { if (responseGeneratorUri != null) { return new Validation(routeContext.resolveEndpoint(responseGeneratorUri).createProducer()); } else { return new Validation(responseGeneratorProcessor); } }
/** * Creates a {@link Validation} process object. * * @param validatorUri * URI of the endpoint that validates an exchange. * @return a validation process object. * @throws Exception * if a producer cannot be created for the endpoint represented * by <code>validatorUri</code>. */ public Validation validation(String validatorUri) throws Exception { Endpoint endpoint = CamelContextHelper.getMandatoryEndpoint(routeBuilder.getContext(), validatorUri); return new Validation(endpoint.createProducer()); }
/** * Creates a new {@link Enricher}. * * @param aggregationStrategy * aggregation strategy to combine input data and additional * data. * @param resourceUri * URI of resource endpoint for obtaining additional data. * @return an enricher. * @throws Exception * if a producer cannot be created for the endpoint represented * by <code>resourceUri</code>. */ public Enricher enricher(AggregationStrategy aggregationStrategy, String resourceUri) throws Exception { Endpoint endpoint = CamelContextHelper.getMandatoryEndpoint(routeBuilder.getContext(), resourceUri); return new Enricher(aggregationStrategy, endpoint.createProducer()); }
@Override public Producer createProducer() throws Exception { final Producer producer = endpoint.createProducer(); final Processor beforeProducer = getBeforeProducer(); final Processor afterProducer = getAfterProducer(); // use a pipeline to process before, producer, after in that order // create producer with the pipeline final Processor pipeline = Pipeline.newInstance(getCamelContext(), beforeProducer, producer, afterProducer); return new ComponentProxyProducer(endpoint, pipeline); }
@Override public Producer createProducer() throws Exception { final Producer producer = endpoint.createProducer(); final Processor beforeProducer = getBeforeProducer(); final Processor afterProducer = getAfterProducer(); // use a pipeline to process before, producer, after in that order // create producer with the pipeline final Processor pipeline = Pipeline.newInstance(getCamelContext(), beforeProducer, producer, afterProducer); return new ComponentProxyProducer(endpoint, pipeline); }
@Override protected void doStart() throws Exception { String url = getEndpoint().getUrl() + "?authUsername=" + getEndpoint().getUsername() + "&authPassword=" + getEndpoint().getPassword() + "&authMethod=Basic"; if (log.isInfoEnabled()) { log.info("Creating NetWeaverProducer using url: {}", URISupport.sanitizeUri(url)); } http = getEndpoint().getCamelContext().getEndpoint(url).createProducer(); ServiceHelper.startService(http); }
/** * Creates a new {@link Enricher} using an {@link AggregatorAdapter} that * adapts an {@link Aggregator} Spring bean identified by name * <code>aggregatorBeanName</code>. The adapter is configured to obtain * the enrichment data from the resource's response-message's body (i.e. * from the out-message's body of the exchange used to communicate with the * resource). * * @param aggregatorBeanName * name of the {@link Aggregator} bean. * @param resourceUri * URI of resource endpoint for obtaining additional data. * @return an enricher. * @throws Exception * if a producer cannot be created for the endpoint represented * by <code>resourceUri</code>. */ public Enricher enricher(String aggregatorBeanName, String resourceUri) throws Exception { Endpoint endpoint = CamelContextHelper.getMandatoryEndpoint(routeBuilder.getContext(), resourceUri); return new Enricher(aggregationStrategy(aggregatorBeanName).aggregationInput(routeBuilder.body()), endpoint.createProducer()); }