Package org.apache.cxf.wsn.client

Examples of org.apache.cxf.wsn.client.Consumer.stop()


        NotificationMessageHolderType message = callback.notifications.get(0);
        assertEquals(WSNHelper.getWSAAddress(subscription.getEpr()),
                     WSNHelper.getWSAAddress(message.getSubscriptionReference()));

        subscription.unsubscribe();
        consumer.stop();
    }

    public void testPullPoint() throws Exception {
        PullPoint pullPoint = createPullPoint.create();
        Subscription subscription = notificationBroker.subscribe(pullPoint, "myTopic");
View Full Code Here


                     WSNHelper.getWSAAddress(message.getProducerReference()));

        subscription.unsubscribe();
        registration.destroy();
        publisher.stop();
        consumer.stop();
    }

    public void testPublisherOnDemand() throws Exception {
        TestConsumer consumerCallback = new TestConsumer();
        Consumer consumer = new Consumer(consumerCallback, "http://localhost:" + port2 + "/test/consumer");
View Full Code Here

        assertTrue(publisherCallback.unsubscribed.await(5, TimeUnit.SECONDS));

        registration.destroy();
        publisher.stop();
        consumer.stop();
    }

    public static class TestConsumer implements Consumer.Callback {

        final List<NotificationMessageHolderType> notifications
View Full Code Here

        // Just sleep for a bit to make sure the notification gets delivered
        Thread.sleep(5000);

        // Cleanup and exit
        subscription.unsubscribe();
        consumer.stop();
        System.exit(0);
    }

}
View Full Code Here

        NotificationMessageHolderType message = callback.notifications.get(0);
        assertEquals(WSNHelper.getWSAAddress(subscription.getEpr()),
                     WSNHelper.getWSAAddress(message.getSubscriptionReference()));

        subscription.unsubscribe();
        consumer.stop();
    }

    public void testPullPoint() throws Exception {
        PullPoint pullPoint = createPullPoint.create();
        Subscription subscription = notificationBroker.subscribe(pullPoint, "myTopic");
View Full Code Here

                     WSNHelper.getWSAAddress(message.getProducerReference()));

        subscription.unsubscribe();
        registration.destroy();
        publisher.stop();
        consumer.stop();
    }
    public void testNullPublisherReference() throws Exception {
        TestConsumer consumerCallback = new TestConsumer();
        Consumer consumer = new Consumer(consumerCallback, "http://localhost:" + port2 + "/test/consumer");
View Full Code Here

                     WSNHelper.getWSAAddress(message.getSubscriptionReference()));

        subscription.unsubscribe();
        registration.destroy();
        publisher.stop();
        consumer.stop();
    }
    public void testPublisherOnDemand() throws Exception {
        TestConsumer consumerCallback = new TestConsumer();
        Consumer consumer = new Consumer(consumerCallback, "http://localhost:" + port2 + "/test/consumer");
View Full Code Here

        assertTrue(publisherCallback.unsubscribed.await(5, TimeUnit.SECONDS));

        registration.destroy();
        publisher.stop();
        consumer.stop();
    }

    public static class TestConsumer implements Consumer.Callback {

        final List<NotificationMessageHolderType> notifications
View Full Code Here

        // Just sleep for a bit to make sure the notification gets delivered
        Thread.sleep(5000);
       
        // Cleanup and exit
        subscription.unsubscribe();
        consumer.stop();
        System.exit(0);
    }

}
View Full Code Here

        NotificationMessageHolderType message = callback.notifications.get(0);
        assertEquals(WSNHelper.getWSAAddress(subscription.getEpr()),
                     WSNHelper.getWSAAddress(message.getSubscriptionReference()));

        subscription.unsubscribe();
        consumer.stop();
    }

    public void testPullPoint() throws Exception {
        PullPoint pullPoint = createPullPoint.create();
        Subscription subscription = notificationBroker.subscribe(pullPoint, "myTopic");
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.