public void setUp() throws Exception { JndiRegistry registry = new JndiRegistry(new JndiContext()); RouteBuilder builder = createRouteBuilder(); CamelContext context = new DefaultCamelContext(registry); testConverter = new TestConverter(); testTransformerFactory = TransformerFactory.newInstance(); registry.bind("testConverter", testConverter); registry.bind("testTransformerFactory", testTransformerFactory); ProcessorEndpoint pep1 = context.getEndpoint(TEST_URI_1, ProcessorEndpoint.class); context.addRoutes(builder); context.start(); builder1 = (XsltBuilder)pep1.getProcessor(); }
protected Endpoint convertBeanToEndpoint(String uri, Object bean) { // We will use the type convert to build the endpoint first Endpoint endpoint = getTypeConverter().convertTo(Endpoint.class, bean); if (endpoint != null) { endpoint.setCamelContext(this); return endpoint; } return new ProcessorEndpoint(uri, this, new BeanProcessor(bean, this)); }
@Override protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { return new ProcessorEndpoint(uri, this, new ParityProcessor()); }