Package net.engio.mbassy.subscription

Examples of net.engio.mbassy.subscription.Subscription


            Collection<Subscription> subscriptions = manager.getSubscriptionsByMessageType(messageType);
            ensureOrdering(subscriptions);
            Collection<ValidationEntry> validationEntries = getEntries(EntriesByMessageType(messageType));
            assertEquals(subscriptions.size(), validationEntries.size());
            for(ValidationEntry validationValidationEntry : validationEntries){
                Subscription matchingSub = null;
                // one of the subscriptions must belong to the subscriber type
                for(Subscription sub : subscriptions){
                    if(sub.belongsTo(validationValidationEntry.subscriber)){
                        matchingSub = sub;
                        break;
                    }
                }
                assertNotNull(matchingSub);
                assertEquals(subscribedListener.getNumberOfListeners(validationValidationEntry.subscriber), matchingSub.size());
            }
        }
    }
View Full Code Here

TOP

Related Classes of net.engio.mbassy.subscription.Subscription

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.