Package com.netflix.eventbus.filter.lang.infix

Examples of com.netflix.eventbus.filter.lang.infix.InfixFilterLanguageSupport


        EventBusImpl bus = eventBus;
        TestAwareConsumerQueueSupplier consumerQueueSupplier = new TestAwareConsumerQueueSupplier();
        bus.setConsumerQueueSupplier(consumerQueueSupplier);

        StatefulEventHandler handler1 = new StatefulEventHandler("con1");
        EventFilter filter = new InfixFilterLanguageSupport().convert("xpath(\"//name\")=\"con1\"");
        bus.registerSubscriber(filter, handler1);
        TestAwareQueue handler1Q = consumerQueueSupplier.testAwareQueue;

        StatefulEventHandler handler2 = new StatefulEventHandler("con2");
        filter = new InfixFilterLanguageSupport().convert("xpath(\"//name\")=\"con1\"");
        bus.registerSubscriber(filter, handler2);
        TestAwareQueue handler2Q = consumerQueueSupplier.testAwareQueue;

        StatefulEventHandler handler3 = new StatefulEventHandler("con3");
        filter = new InfixFilterLanguageSupport().convert("xpath(\"//name\")=\"con3\"");
        bus.registerSubscriber(filter, handler3);
        bus.publish(new Event("con1", 1));

        checkIfEventOfferedAndDispatched(handler1Q, handler1);
        checkIfEventOfferedAndDispatched(handler2Q, handler2);
View Full Code Here

TOP

Related Classes of com.netflix.eventbus.filter.lang.infix.InfixFilterLanguageSupport

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.