Examples of RouteDefinition


Examples of org.apache.camel.model.RouteDefinition

                      new HashSet<Object>() );
    }

    public Processor wrap(RouteContext routeContext,
                          Processor processor) {
        RouteDefinition routeDef = routeContext.getRoute();

        ToDefinition toDrools = getDroolsNode( routeDef );

        Processor returnedProcessor;
        if ( toDrools != null ) {
View Full Code Here

Examples of org.apache.camel.model.RouteDefinition

        return context.removeRoute(getRouteId());
    }

    public String dumpRouteAsXml() throws Exception {
        String id = route.getId();
        RouteDefinition def = context.getRouteDefinition(id);
        if (def != null) {
            return ModelHelper.dumpModelAsXml(def);
        }
        return null;
    }
View Full Code Here

Examples of org.apache.camel.model.RouteDefinition

        return null;
    }

    public void updateRouteFromXml(String xml) throws Exception {
        // convert to model from xml
        RouteDefinition def = ModelHelper.createModelFromXml(xml, RouteDefinition.class);
        if (def == null) {
            return;
        }

        // add will remove existing route first
View Full Code Here

Examples of org.apache.camel.model.RouteDefinition

        }

        // can either be routes or a single route
        RoutesDefinition answer = null;
        if (result instanceof RouteDefinition) {
            RouteDefinition route = (RouteDefinition) result;
            answer = new RoutesDefinition();
            answer.getRoutes().add(route);
        } else if (result instanceof RoutesDefinition) {
            answer = (RoutesDefinition) result;
        } else {
View Full Code Here

Examples of org.apache.camel.model.RouteDefinition

     */
    protected boolean removeRouteDefinition(String key) {
        boolean answer = false;
        Iterator<RouteDefinition> iter = routeDefinitions.iterator();
        while (iter.hasNext()) {
            RouteDefinition route = iter.next();
            if (route.idOrCreate(nodeIdFactory).equals(key)) {
                iter.remove();
                answer = true;
            }
        }
        return answer;
View Full Code Here

Examples of org.apache.camel.model.RouteDefinition

        List<Class> list = exceptionType.getExceptionClasses();
        for (Class clazz : list) {
            String routeId = null;
            // only get the route id, if the exception type is route scoped
            if (exceptionType.isRouteScoped()) {
                RouteDefinition route = ProcessorDefinitionHelper.getRoute(exceptionType);
                if (route != null) {
                    routeId = route.getId();
                }
            }
            ExceptionPolicyKey key = new ExceptionPolicyKey(routeId, clazz, exceptionType.getOnWhen());
            exceptionPolicies.put(key, exceptionType);
        }
View Full Code Here

Examples of org.apache.camel.model.RouteDefinition

     * @param uri  the from uri
     * @return the builder
     */
    public RouteDefinition from(String uri) {
        getRouteCollection().setCamelContext(getContext());
        RouteDefinition answer = getRouteCollection().from(uri);
        configureRoute(answer);
        return answer;
    }
View Full Code Here

Examples of org.apache.camel.model.RouteDefinition

     * @param args arguments for the string formatting of the uri
     * @return the builder
     */
    public RouteDefinition fromF(String uri, Object... args) {
        getRouteCollection().setCamelContext(getContext());
        RouteDefinition answer = getRouteCollection().from(String.format(uri, args));
        configureRoute(answer);
        return answer;
    }
View Full Code Here

Examples of org.apache.camel.model.RouteDefinition

     * @param endpoint  the from endpoint
     * @return the builder
     */
    public RouteDefinition from(Endpoint endpoint) {
        getRouteCollection().setCamelContext(getContext());
        RouteDefinition answer = getRouteCollection().from(endpoint);
        configureRoute(answer);
        return answer;
    }
View Full Code Here

Examples of org.apache.camel.model.RouteDefinition

     * @param uris  the from uris
     * @return the builder
     */
    public RouteDefinition from(String... uris) {
        getRouteCollection().setCamelContext(getContext());
        RouteDefinition answer = getRouteCollection().from(uris);
        configureRoute(answer);
        return answer;
    }
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.