Package org.jclouds.sqs

Examples of org.jclouds.sqs.SQSApi


      HttpResponse deleteMessageResponse = HttpResponse.builder()
            .statusCode(200)
            .payload(payloadFromResourceWithContentType("/delete_message_batch.xml", "text/xml")).build();

      SQSApi apiWhenExist = requestSendsResponse(deleteMessageMap, deleteMessageResponse);

      assertEquals(
            apiWhenExist.getMessageApiForQueue(queue)
                  .delete(ImmutableMap.of("foo1", "eXJYhj5rDr9cAe", "foo2", "fffeeerrr")).toString(),
            new DeleteMessageBatchResponseTest().expected().toString());
   }
View Full Code Here


            .payload(
                  payloadFromStringWithContentType(
                        "<ChangeMessageVisibilityResponse><ResponseMetadata><RequestId>b5293cb5-d306-4a17-9048-b263635abe42</RequestId></ResponseMetadata></ChangeMessageVisibilityResponse>",
                        "text/xml")).build();

      SQSApi apiWhenExist = requestSendsResponse(changeMessageVisibility, changeMessageVisibilityResponse);

      apiWhenExist.getMessageApiForQueue(queue).changeVisibility("eXJYhj5rDr9cAe", 10);
   }
View Full Code Here

      HttpResponse sendMessageResponse = HttpResponse.builder()
            .statusCode(200)
            .payload(payloadFromResourceWithContentType("/change_message_visibility_batch.xml", "text/xml")).build();

      SQSApi apiWhenExist = requestSendsResponse(changeMessageVisibilityTable, sendMessageResponse);

      assertEquals(apiWhenExist.getMessageApiForQueue(queue).changeVisibility(ImmutableTable.<String, String, Integer>builder()
            .put("foo1", "aaaaaaaaa", 1)
            .put("foo2", "bbbbbbbbb", 10)
            .build())
            .toString(), new ChangeMessageVisibilityBatchResponseTest().expected().toString());
   }
View Full Code Here

      HttpResponse sendMessageResponse = HttpResponse.builder()
            .statusCode(200)
            .payload(payloadFromResourceWithContentType("/change_message_visibility_batch.xml", "text/xml")).build();

      SQSApi apiWhenExist = requestSendsResponse(changeMessageVisibilityMap, sendMessageResponse);

      assertEquals(
            apiWhenExist.getMessageApiForQueue(queue).changeVisibility(ImmutableMap.of("aaaaaaaaa", 1, "bbbbbbbbb", 10))
                  .toString(), new ChangeMessageVisibilityBatchResponseTest().expected().toString());
   }
View Full Code Here

      HttpResponse sendMessageResponse = HttpResponse.builder()
            .statusCode(200)
            .payload(payloadFromResourceWithContentType("/change_message_visibility_batch.xml", "text/xml")).build();

      SQSApi apiWhenExist = requestSendsResponse(changeMessageVisibilityMapInt, sendMessageResponse);

      assertEquals(apiWhenExist.getMessageApiForQueue(queue).changeVisibility(ImmutableMap.<String, String>builder()
            .put("foo1", "aaaaaaaaa")
            .put("foo2", "bbbbbbbbb")
            .build(), 10)
            .toString(), new ChangeMessageVisibilityBatchResponseTest().expected().toString());
   }
View Full Code Here

      HttpResponse sendMessageResponse = HttpResponse.builder()
            .statusCode(200)
            .payload(payloadFromResourceWithContentType("/change_message_visibility_batch.xml", "text/xml")).build();

      SQSApi apiWhenExist = requestSendsResponse(changeMessageVisibilityIterableInt, sendMessageResponse);

      assertEquals(
            apiWhenExist.getMessageApiForQueue(queue).changeVisibility(ImmutableSet.of("aaaaaaaaa", "bbbbbbbbb"), 10)
                  .toString(), new ChangeMessageVisibilityBatchResponseTest().expected().toString());
   }
View Full Code Here

            .payload(
                  payloadFromStringWithContentType(
                        "<AddPermissionsResponse><ResponseMetadata><RequestId>b5293cb5-d306-4a17-9048-b263635abe42</RequestId></ResponseMetadata></AddPermissionsResponse>",
                        "text/xml")).build();

      SQSApi apiWhenExist = requestSendsResponse(addPermission, addPermissionResponse);

      apiWhenExist.getPermissionApiForQueue(queue).addPermissionToAccount("testLabel", Action.RECEIVE_MESSAGE, "125074342641");
   }
View Full Code Here

   public void testSendMessageWhenResponseIs2xx() throws Exception {
     
      HttpResponse sendMessageResponse = HttpResponse.builder().statusCode(200)
            .payload(payloadFromResourceWithContentType("/send_message.xml", "text/xml")).build();

      SQSApi apiWhenExist = requestSendsResponse(sendMessage, sendMessageResponse);

      assertEquals(apiWhenExist.getMessageApiForQueue(queue).send("hardyharhar").toString(),
            new SendMessageResponseTest().expected().toString());
   }
View Full Code Here

      HttpResponse sendMessageResponse = HttpResponse.builder()
            .statusCode(200)
            .payload(payloadFromResourceWithContentType("/send_message_batch.xml", "text/xml")).build();

      SQSApi apiWhenExist = requestSendsResponse(sendMessageIterable, sendMessageResponse);

      assertEquals(apiWhenExist.getMessageApiForQueue(queue).send(ImmutableSet.of("payload1", "payload2"))
            .toString(), new SendMessageBatchResponseTest().expected().toString());
   }
View Full Code Here

      HttpResponse sendMessageResponse = HttpResponse.builder()
            .statusCode(200)
            .payload(payloadFromResourceWithContentType("/send_message_batch.xml", "text/xml")).build();

      SQSApi apiWhenExist = requestSendsResponse(sendMessageMap, sendMessageResponse);

      assertEquals(
            apiWhenExist.getMessageApiForQueue(queue)
                  .send(ImmutableMap.of("foo1", "payload1", "foo2", "payload2")).toString(),
            new SendMessageBatchResponseTest().expected().toString());
   }
View Full Code Here

TOP

Related Classes of org.jclouds.sqs.SQSApi

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.