Examples of MessageSelector


Examples of org.springframework.integration.core.MessageSelector

       
        Map<String, String> headers = new HashMap<String, String>();
        headers.put("foo", "bar");
       
        final AtomicLong retries = new AtomicLong();
        MessageSelector selector = new HeaderMatchingMessageSelector(headers) {
            @Override
            public boolean accept(Message<?> message) {
                return retries.incrementAndGet() > 7;
            }
        };
View Full Code Here

Examples of org.springframework.integration.core.MessageSelector

       
        Map<String, String> headers = new HashMap<String, String>();
        headers.put("foo", "bar");
       
        final AtomicLong retries = new AtomicLong();
        MessageSelector selector = new HeaderMatchingMessageSelector(headers) {
            @Override
            public boolean accept(Message<?> message) {
                retries.incrementAndGet();
                return super.accept(message);
            }
View Full Code Here

Examples of org.springframework.integration.core.MessageSelector

       
        Map<String, String> headers = new HashMap<String, String>();
        headers.put("foo", "bar");
       
        final AtomicLong retries = new AtomicLong();
        MessageSelector selector = new HeaderMatchingMessageSelector(headers) {
            @Override
            public boolean accept(Message<?> message) {
                retries.incrementAndGet();
                return super.accept(message);
            }
View Full Code Here

Examples of org.springframework.integration.core.MessageSelector

        endpointAdapter.setTestContextFactory(testContextFactory);
    }

    @BeforeMethod
    public void purgeChannel() {
        channel.purge(new MessageSelector() {
            @Override
            public boolean accept(org.springframework.messaging.Message message) {
                return false; //purge all messages
            }
        });
View Full Code Here

Examples of org.springframework.integration.core.MessageSelector

    public void testPurgeWithMessageSelector() throws Exception {
        PurgeMessageChannelAction purgeChannelAction = new PurgeMessageChannelAction();
        purgeChannelAction.setBeanFactory(applicationContext);
        purgeChannelAction.afterPropertiesSet();
       
        MessageSelector messageSelector = new MessageSelector() {
            public boolean accept(Message message) {
                return false;
            }
        };
       
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.