Package org.apache.camel

Examples of org.apache.camel.PollingConsumer.receiveNoWait()


        if (LOG.isDebugEnabled()) {
            LOG.debug("<<<< " + endpoint);
        }

        PollingConsumer consumer = getConsumer(endpoint);
        return consumer.receiveNoWait();
    }
   
    public CamelContext getCamelContext() {
        return camelContext;
    }
View Full Code Here


        Thread.sleep(5000);

        PollingConsumer consumer = context.getEndpoint("activemq:queue:bar").createPollingConsumer();
        consumer.start();

        Exchange bar = consumer.receiveNoWait();
        assertNull("Should NOT be a message on queue", bar);

        consumer.stop();

        template.sendBody("activemq:queue:foo", "Hello World");
View Full Code Here

        Thread.sleep(5000);

        PollingConsumer consumer = context.getEndpoint("activemq:queue:bar").createPollingConsumer();
        consumer.start();

        Exchange bar = consumer.receiveNoWait();
        assertNull("Should NOT be a message on queue", bar);

        consumer.stop();

        template.sendBody("activemq:queue:foo", "Hello World");
View Full Code Here

        if (LOG.isDebugEnabled()) {
            LOG.debug("<<<< " + endpoint);
        }

        PollingConsumer consumer = getConsumer(endpoint);
        return consumer.receiveNoWait();
    }
   
    public CamelContext getCamelContext() {
        return camelContext;
    }
View Full Code Here

    public Exchange receiveNoWait(Endpoint endpoint) {
        LOG.debug("<<<< {}", endpoint);

        PollingConsumer consumer = getConsumer(endpoint);
        return consumer.receiveNoWait();
    }
   
    public CamelContext getCamelContext() {
        return camelContext;
    }
View Full Code Here

        File file = new File(FTP_ROOT_DIR + "polling/bye.txt").getAbsoluteFile();
        assertTrue("File should exist " + file, file.exists());

        // and no exchange on consumer as
        exchange = consumer.receiveNoWait();
        assertNull(exchange);

        consumer.stop();
    }
View Full Code Here

        File file = new File("target/enrich/bye.txt").getAbsoluteFile();
        assertTrue("File should exist " + file, file.exists());

        // and no exchange on consumer as
        exchange = consumer.receiveNoWait();
        assertNull(exchange);

        consumer.stop();
    }
View Full Code Here

    public Exchange receiveNoWait(Endpoint endpoint) {
        LOG.debug("<<<< {}", endpoint);

        PollingConsumer consumer = getConsumer(endpoint);
        return consumer.receiveNoWait();
    }
   
    public CamelContext getCamelContext() {
        return camelContext;
    }
View Full Code Here

        if (LOG.isDebugEnabled()) {
            LOG.debug("<<<< " + endpoint);
        }

        PollingConsumer consumer = getConsumer(endpoint);
        return consumer.receiveNoWait();
    }

    protected void doStop() throws Exception {
        ServiceHelper.stopServices(consumers.values());
        consumers.clear();
View Full Code Here

    public Exchange receiveNoWait(Endpoint endpoint) {
        LOG.debug("<<<< {}", endpoint);

        PollingConsumer consumer = getConsumer(endpoint);
        return consumer.receiveNoWait();
    }
   
    public CamelContext getCamelContext() {
        return camelContext;
    }
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.