Package org.apache.camel.impl

Examples of org.apache.camel.impl.ProcessorEndpoint


        // force loading of schema at create time otherwise concurrent
        // processing could cause thread safe issues for the javax.xml.validation.SchemaFactory
        validator.loadSchema();

        return new ProcessorEndpoint(uri, this, validator);
    }
View Full Code Here


        if (endpoint != null) {
            endpoint.setCamelContext(this);
            return endpoint;
        }

        return new ProcessorEndpoint(uri, this, new BeanProcessor(bean, this));
    }
View Full Code Here

        LOG.debug("{} using schema resource: {}", this, resourceUri);

        XQueryBuilder xslt = XQueryBuilder.xquery(url);
        xslt.setModuleURIResolver(getModuleURIResolver());
        configureXslt(xslt, uri, remaining, parameters);
        return new ProcessorEndpoint(uri, this, xslt);
    }
View Full Code Here

        String group = getAndRemoveParameter(parameters, "group", String.class);
        if (group != null) {
            beanValidator.setGroup(getCamelContext().getClassResolver().resolveMandatoryClass(group));
        }

        return new ProcessorEndpoint(uri, this, beanValidator);
    }
View Full Code Here

        if (isPlatform("aix")) {
            // cannot run on aix
            return;
        }

        ProcessorEndpoint endpoint = context.getEndpoint("bean-validator://x", ProcessorEndpoint.class);
        BeanValidator processor = (BeanValidator) endpoint.getProcessor();

        assertNull(processor.getGroup());
        assertTrue(processor.getValidator() instanceof ValidatorImpl);
        assertTrue(processor.getMessageInterpolator() instanceof ResourceBundleMessageInterpolator);
        assertTrue(processor.getTraversableResolver() instanceof DefaultTraversableResolver);
View Full Code Here

        if (isPlatform("aix")) {
            // cannot run on aix
            return;
        }

        ProcessorEndpoint endpoint = context.getEndpoint("bean-validator://x"
                + "?group=org.apache.camel.component.bean.validator.OptionalChecks"
                + "&messageInterpolator=#myMessageInterpolator"
                + "&traversableResolver=#myTraversableResolver"
                + "&constraintValidatorFactory=myConstraintValidatorFactory", ProcessorEndpoint.class);
        BeanValidator processor = (BeanValidator) endpoint.getProcessor();

        assertEquals("org.apache.camel.component.bean.validator.OptionalChecks", processor.getGroup().getName());
        assertTrue(processor.getValidator() instanceof ValidatorImpl);
        assertSame(processor.getMessageInterpolator(), this.messageInterpolator);
        assertSame(processor.getTraversableResolver(), this.traversableResolver);
View Full Code Here

        } else {
            Class clazz = getCamelContext().getClassResolver().resolveMandatoryClass(remaining, ContentHandler.class);
            processor = new StAXProcessor(clazz);
        }
        setProperties(processor, parameters);
        return new ProcessorEndpoint(uri, this, processor);
    }
View Full Code Here

        // force loading of schema at create time otherwise concurrent processing could
        // cause thread safe issues for the javax.xml.validation.SchemaFactory
        validator.loadSchema();

        return new ProcessorEndpoint(uri, this, validator);
    }
View Full Code Here

        loadResource(xslt, resourceUri);

        // default to use the cache option from the component if the endpoint did not have the contentCache parameter
        boolean cache = getAndRemoveParameter(parameters, "contentCache", Boolean.class, contentCache);
        if (!cache) {
            return new ProcessorEndpoint(uri, this, xslt) {
                @Override
                protected void onExchange(Exchange exchange) throws Exception {
                    // force to load the resource on each exchange as we are not cached
                    loadResource(xslt, resourceUri);
                    super.onExchange(exchange);
                }
            };
        } else {
            // we have already loaded xslt so we are cached
            return new ProcessorEndpoint(uri, this, xslt);
        }
    }
View Full Code Here

        loadResource(xslt, resource);

        // default to use the cache option from the component if the endpoint did not have the contentCache parameter
        boolean cache = getAndRemoveParameter(parameters, "contentCache", Boolean.class, contentCache);
        if (!cache) {
            return new ProcessorEndpoint(uri, this, xslt) {
                @Override
                protected void onExchange(Exchange exchange) throws Exception {
                    // force to load the resource on each exchange as we are not cached
                    loadResource(xslt, resource);
                    super.onExchange(exchange);
                }
            };
        } else {
            // we have already loaded xslt so we are cached
            return new ProcessorEndpoint(uri, this, xslt);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.impl.ProcessorEndpoint

Copyright © 2018 www.massapicom. 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.