Package net.engio.mbassy.listener

Examples of net.engio.mbassy.listener.MetadataReader


    }

    @Test
    public void testStrongListenerSubscription() throws Exception {
        ListenerFactory listeners = listeners(CustomInvocationListener.class);
        SubscriptionManager subscriptionManager = new SubscriptionManager(new MetadataReader(), new SubscriptionFactory(), mockedRuntime());
        ConcurrentExecutor.runConcurrent(TestUtil.subscriber(subscriptionManager, listeners), ConcurrentUnits);

        listeners.clear();
        runGC();
View Full Code Here


    public void testOverloadedMessageHandlers(){
        ListenerFactory listeners = listeners(
                Overloading.ListenerBase.class,
                Overloading.ListenerSub.class);

        SubscriptionManager subscriptionManager = new SubscriptionManager(new MetadataReader(), new SubscriptionFactory(), mockedRuntime());
        ConcurrentExecutor.runConcurrent(TestUtil.subscriber(subscriptionManager, listeners), ConcurrentUnits);

        SubscriptionValidator expectedSubscriptions = new SubscriptionValidator(listeners)
                .listener(Overloading.ListenerBase.class).handles(Overloading.TestMessageA.class, Overloading.TestMessageA.class)
                .listener(Overloading.ListenerSub.class).handles(Overloading.TestMessageA.class, Overloading.TestMessageA.class, Overloading.TestMessageB.class);
View Full Code Here

    @Test
    public void testPrioritizedMessageHandlers(){
        ListenerFactory listeners = listeners(PrioritizedListener.class);

        SubscriptionManager subscriptionManager = new SubscriptionManager(new MetadataReader(), new SubscriptionFactory(), mockedRuntime());
        ConcurrentExecutor.runConcurrent(TestUtil.subscriber(subscriptionManager, listeners), ConcurrentUnits);

        SubscriptionValidator expectedSubscriptions = new SubscriptionValidator(listeners)
                .listener(PrioritizedListener.class).handles(IMessage.class, IMessage.class, IMessage.class, IMessage.class);
View Full Code Here

        }
        return factory;
    }

    private void runTestWith(final ListenerFactory listeners, final SubscriptionValidator validator){
        final SubscriptionManager subscriptionManager = new SubscriptionManager(new MetadataReader(), new SubscriptionFactory(), mockedRuntime());

        ConcurrentExecutor.runConcurrent(TestUtil.subscriber(subscriptionManager, listeners), ConcurrentUnits);

        validator.validate(subscriptionManager);
View Full Code Here

    class SyncPubSub implements Feature{

        public static final SyncPubSub Default(){
            return new SyncPubSub()
                    .setMetadataReader(new MetadataReader())
                    .setPublicationFactory(new MessagePublication.Factory())
                    .setSubscriptionFactory(new SubscriptionFactory())
                    .setSubscriptionManagerProvider(new SubscriptionManagerProvider());
        }
View Full Code Here

TOP

Related Classes of net.engio.mbassy.listener.MetadataReader

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.