Package com.microsoft.windowsazure.services.servicebus.models

Examples of com.microsoft.windowsazure.services.servicebus.models.TopicInfo


            throws ServiceException {
        Feed feed = listOptions(options,
                getResource().path("$Resources/Topics")).get(Feed.class);
        ArrayList<TopicInfo> topics = new ArrayList<TopicInfo>();
        for (Entry entry : feed.getEntries()) {
            topics.add(new TopicInfo(entry));
        }
        ListTopicsResult result = new ListTopicsResult();
        result.setItems(topics);
        return result;
    }
View Full Code Here


    @Test
    public void ruleDetailsMayBeFetched() throws Exception {
        // Arrange
        String topicName = "TestruleDetailsMayBeFetched";
        service.createTopic(new TopicInfo(topicName));
        service.createSubscription(topicName, new SubscriptionInfo("sub"));

        // Act
        RuleInfo result = service.getRule(topicName, "sub", "$Default")
                .getValue();
View Full Code Here

    @Test
    public void rulesMayBeDeleted() throws Exception {
        // Arrange
        String topicName = "TestRulesMayBeDeleted";
        service.createTopic(new TopicInfo(topicName));
        service.createSubscription(topicName, new SubscriptionInfo("sub"));
        service.createRule(topicName, "sub", new RuleInfo("MyRule4"));
        service.createRule(topicName, "sub", new RuleInfo("MyRule5"));

        // Act
View Full Code Here

    @Test
    public void rulesMayHaveActionAndFilter() throws ServiceException {
        // Arrange
        String topicName = "TestRulesMayHaveAnActionAndFilter";
        service.createTopic(new TopicInfo(topicName));
        service.createSubscription(topicName, new SubscriptionInfo("sub"));

        // Act
        RuleInfo ruleOne = service.createRule(topicName, "sub",
                new RuleInfo("One").withCorrelationIdFilter("my-id"))
View Full Code Here

    @Test
    public void getTopicMessageCountDetails() throws Exception {
        // Arrange
        String topicName = "TestGetTopicMessageCountDetails";
        service.createTopic(new TopicInfo(topicName)).getValue();
        Long expectedActiveMessageCount = 0L;
        Long expectedDeadLetterMessageCount = 0L;
        Long expectedScheduledMessageCount = 0L;
        Long expectedTransferMessageCount = 0L;
        Long expectedTransferDeadLetterMessageCount = 0L;

        // Act
        TopicInfo topicInfo = service.getTopic(topicName).getValue();
        MessageCountDetails countDetails = topicInfo.getCountDetails();

        // Assert
        assertNotNull(topicInfo);
        assertNotNull(countDetails);
        assertEquals(expectedActiveMessageCount,
View Full Code Here

    @Test
    public void getSubscriptionMessageCountDetails() throws Exception {
        // Arrange
        String topicName = "TestGetSubscriptionMessageCountDetails";
        String subscriptionName = "TestGetSubscriptionMessageCountDetails";
        service.createTopic(new TopicInfo(topicName)).getValue();
        service.createSubscription(topicName, new SubscriptionInfo(
                subscriptionName));
        Long expectedActiveMessageCount = 1L;
        Long expectedDeadLetterMessageCount = 0L;
        Long expectedScheduledMessageCount = 0L;
View Full Code Here

    @Test
    public void renewSubscriptionMessageLockWorks() throws Exception {
        // Arrange
        String topicName = "TestRenewSubscriptionLockMessageWorks";
        String subscriptionName = "renewSubscriptionMessageLockWorks";
        service.createTopic(new TopicInfo(topicName));
        service.createSubscription(topicName, new SubscriptionInfo(
                subscriptionName));
        service.sendTopicMessage(topicName, new BrokeredMessage("Hello Again"));

        // Act
View Full Code Here

            throws Exception {
        // Arrange
        String sourceTopicName = "TestReceiveSubForwardToQueueMessageSuccessSource";
        String sourceSubscriptionName = "TestReceiveSubForwardToQueueMessageSuccessSource";
        String destinationQueueName = "TestReceiveSubForwardToQueueMessageSuccessDestination";
        service.createTopic(new TopicInfo(sourceTopicName)).getValue();
        QueueInfo destinationQueueInfo = service.createQueue(
                new QueueInfo(destinationQueueName)).getValue();
        service.createSubscription(sourceTopicName, new SubscriptionInfo(
                sourceSubscriptionName).setForwardTo(destinationQueueInfo
                .getUri().toString()));
View Full Code Here

            throws Exception {
        // Arrange
        String sourceTopicName = "TestUpdatedReceiveSubForwardToQMessageSuccessSrc";
        String sourceSubscriptionName = "TestUpdatedReceiveSubForwardToQMessageSuccessSrc";
        String destinationQueueName = "TestUpdatedReceiveSubForwardToQMessageSuccessDest";
        service.createTopic(new TopicInfo(sourceTopicName)).getValue();
        QueueInfo destinationQueueInfo = service.createQueue(
                new QueueInfo(destinationQueueName)).getValue();
        SubscriptionInfo sourceSubscriptionInfo = service.createSubscription(
                sourceTopicName, new SubscriptionInfo(sourceSubscriptionName))
                .getValue();
View Full Code Here

    public void receiveQueueForwardToTopicMessageSuccess() throws Exception {
        // Arrange
        String sourceQueueName = "TestReceiveQueueForwardToTopicMessageSuccessSource";
        String destinationTopicName = "TestReceiveQueueForwardToTopicMessageSuccessDestination";
        String destinationSubscriptionName = "TestReceiveQueueForwardToTopicMessageSuccessDestination";
        TopicInfo destinationTopicInfo = service.createTopic(
                new TopicInfo(destinationTopicName)).getValue();
        service.createQueue(
                new QueueInfo(sourceQueueName)
                        .setForwardTo(destinationTopicInfo.getUri().toString()))
                .getValue();

        // Act
        service.sendQueueMessage(sourceQueueName, new BrokeredMessage(
                "Hello source queue!"));
View Full Code Here

TOP

Related Classes of com.microsoft.windowsazure.services.servicebus.models.TopicInfo

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.