Examples of InterceptSendToEndpoint


Examples of org.apache.camel.impl.InterceptSendToEndpoint

                    return endpoint;
                } else if (getUri() == null || matchPattern(routeContext.getCamelContext(), uri, getUri())) {
                    // only proxy if the uri is matched decorate endpoint with our proxy
                    // should be false by default
                    boolean skip = isSkipSendToOriginalEndpoint();
                    InterceptSendToEndpoint proxy = new InterceptSendToEndpoint(endpoint, skip);
                    proxy.setDetour(detour);
                    return proxy;
                } else {
                    // no proxy so return regular endpoint
                    return endpoint;
                }
View Full Code Here

Examples of org.apache.camel.impl.InterceptSendToEndpoint

                    return endpoint;
                } else if (getUri() == null || EndpointHelper.matchEndpoint(uri, getUri())) {
                    // only proxy if the uri is matched decorate endpoint with our proxy
                    // should be false by default
                    boolean skip = getSkipSendToOriginalEndpoint() != null ? getSkipSendToOriginalEndpoint() : false;
                    InterceptSendToEndpoint proxy = new InterceptSendToEndpoint(endpoint, skip);
                    proxy.setDetour(detour);
                    return proxy;
                } else {
                    // no proxy so return regular endpoint
                    return endpoint;
                }
View Full Code Here

Examples of org.apache.camel.impl.InterceptSendToEndpoint

                    return endpoint;
                } else if (getUri() == null || EndpointHelper.matchEndpoint(uri, getUri())) {
                    // only proxy if the uri is matched decorate endpoint with our proxy
                    // should be false by default
                    boolean skip = getSkipSendToOriginalEndpoint() != null ? getSkipSendToOriginalEndpoint() : false;
                    InterceptSendToEndpoint proxy = new InterceptSendToEndpoint(endpoint, skip);
                    proxy.setDetour(detour);
                    return proxy;
                } else {
                    // no proxy so return regular endpoint
                    return endpoint;
                }
View Full Code Here

Examples of org.apache.camel.impl.InterceptSendToEndpoint

                    return endpoint;
                } else if (getUri() == null || EndpointHelper.matchEndpoint(routeContext.getCamelContext(), uri, getUri())) {
                    // only proxy if the uri is matched decorate endpoint with our proxy
                    // should be false by default
                    boolean skip = isSkipSendToOriginalEndpoint();
                    InterceptSendToEndpoint proxy = new InterceptSendToEndpoint(endpoint, skip);
                    proxy.setDetour(detour);
                    return proxy;
                } else {
                    // no proxy so return regular endpoint
                    return endpoint;
                }
View Full Code Here

Examples of org.apache.camel.impl.InterceptSendToEndpoint

        } else if (matchPattern(uri, endpoint, pattern)) {
            // if pattern is null then it mean to match all

            // only proxy if the uri is matched decorate endpoint with our proxy
            // should be false by default
            InterceptSendToEndpoint proxy = new InterceptSendToEndpoint(endpoint, skip);

            // create mock endpoint which we will use as interceptor
            // replace :// from scheme to make it easy to lookup the mock endpoint without having double :// in uri
            String key = "mock:" + endpoint.getEndpointKey().replaceFirst("://", ":");
            // strip off parameters as well
            if (key.contains("?")) {
                key = ObjectHelper.before(key, "?");
            }
            LOG.info("Adviced endpoint [" + uri + "] with mock endpoint [" + key + "]");

            MockEndpoint mock = endpoint.getCamelContext().getEndpoint(key, MockEndpoint.class);
            Producer producer;
            try {
                producer = mock.createProducer();
            } catch (Exception e) {
                throw wrapRuntimeCamelException(e);
            }

            // allow custom logic
            producer = onInterceptEndpoint(uri, endpoint, mock, producer);
            proxy.setDetour(producer);

            return proxy;
        } else {
            // no proxy so return regular endpoint
            return endpoint;
View Full Code Here

Examples of org.apache.camel.impl.InterceptSendToEndpoint

                    return endpoint;
                } else if (getUri() == null || EndpointHelper.matchEndpoint(uri, getUri())) {
                    // only proxy if the uri is matched decorate endpoint with our proxy
                    // should be false by default
                    boolean skip = getSkipSendToOriginalEndpoint() != null ? getSkipSendToOriginalEndpoint() : false;
                    InterceptSendToEndpoint proxy = new InterceptSendToEndpoint(endpoint, skip);
                    proxy.setDetour(detour);
                    return proxy;
                } else {
                    // no proxy so return regular endpoint
                    return endpoint;
                }
View Full Code Here

Examples of org.fusesource.ide.camel.model.generated.InterceptSendToEndpoint

      return "inOnly " + Strings.getOrElse(node.getUri());
    } else if (this instanceof InOut) {
      InOut node = (InOut) this;
      return "inOut " + Strings.getOrElse(node.getUri());
    } else if (this instanceof InterceptSendToEndpoint) {
      InterceptSendToEndpoint node = (InterceptSendToEndpoint) this;
      return "intercept " + Strings.getOrElse(node.getUri());
    } else if (this instanceof Log) {
      Log node = (Log) this;
      return "log " + Strings.getOrElse(node.getLogName());
    } else if (this instanceof Marshal) {
      return "marshal";
    } else if (this instanceof OnException) {
      OnException node = (OnException) this;
      return "on exception " + Strings.getOrElse(node.getExceptions());
    } else if (this instanceof Otherwise) {
      return "otherwise";
    } else if (this instanceof PollEnrich) {
      PollEnrich node = (PollEnrich) this;
      return "poll enrich " + Strings.getOrElse(node.getResourceUri());
    } else if (this instanceof RemoveHeader) {
      RemoveHeader node = (RemoveHeader) this;
      return "remove header " + Strings.getOrElse(node.getHeaderName());
    } else if (this instanceof RemoveProperty) {
      RemoveProperty node = (RemoveProperty) this;
      return "remove property " + Strings.getOrElse(node.getPropertyName());
    } else if (this instanceof Rollback) {
      Rollback node = (Rollback) this;
      return "rollback " + Strings.getOrElse(node.getMessage());
    } else if (this instanceof SetExchangePattern) {
      SetExchangePattern node = (SetExchangePattern) this;
      ExchangePattern pattern = node.getPattern();
      if (pattern == null) {
        return "setExchangePattern";
      } else {
        return "set " + pattern;
      }
    } else if (this instanceof Sort) {
      Sort node = (Sort) this;
      return "sort " + Expressions.getExpressionOrElse(node.getExpression());
    } else if (this instanceof When) {
      When node = (When) this;
      return "when " + Expressions.getExpressionOrElse(node.getExpression());
    } else if (this instanceof Unmarshal) {
      return "unmarshal";
    } else if (this instanceof Try) {
      return "try";
    } else if (this instanceof LoadBalance) {
View Full Code Here

Examples of org.fusesource.ide.camel.model.generated.InterceptSendToEndpoint

        imageProvider.addIconsForClass(new IdempotentConsumer());
        imageProvider.addIconsForClass(new InOnly());
        imageProvider.addIconsForClass(new InOut());
        imageProvider.addIconsForClass(new Intercept());
        imageProvider.addIconsForClass(new InterceptFrom());
        imageProvider.addIconsForClass(new InterceptSendToEndpoint());
        imageProvider.addIconsForClass(new LoadBalance());
        imageProvider.addIconsForClass(new Log());
        imageProvider.addIconsForClass(new Loop());
        imageProvider.addIconsForClass(new Marshal());
        imageProvider.addIconsForClass(new Multicast());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.