Examples of MessagePublication


Examples of net.engio.mbassy.bus.MessagePublication

            SynchronizedWithSynchronousDelivery handler = new SynchronizedWithSynchronousDelivery();
            handlers.add(handler);
            bus.subscribe(handler);
        }

        MessagePublication publication = null;
        for(int i = 0; i < numberOfMessages; i++){
           publication =  bus.post(new Object()).asynchronously();
        }
        // wait for last publication
        while (!publication.isFinished()){
            pause(100);
        }

        for(SynchronizedWithSynchronousDelivery handler : handlers){
            assertEquals(incrementsPerMessage * numberOfMessages, handler.counter);
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.