Package com.amazonaws.services.sqs.model

Examples of com.amazonaws.services.sqs.model.GetQueueUrlResult


                +  configuration.getQueueOwnerAWSAccountId() + "/" + configuration.getQueueName();
        } else if (configuration.getQueueOwnerAWSAccountId() != null) {
            GetQueueUrlRequest getQueueUrlRequest = new GetQueueUrlRequest();
            getQueueUrlRequest.setQueueName(configuration.getQueueName());
            getQueueUrlRequest.setQueueOwnerAWSAccountId(configuration.getQueueOwnerAWSAccountId());
            GetQueueUrlResult getQueueUrlResult = client.getQueueUrl(getQueueUrlRequest);
            queueUrl = getQueueUrlResult.getQueueUrl();
        } else {
            // check whether the queue already exists
            ListQueuesResult listQueuesResult = client.listQueues();
            for (String url : listQueuesResult.getQueueUrls()) {
                if (url.endsWith("/" + configuration.getQueueName())) {
View Full Code Here


                +  configuration.getQueueOwnerAWSAccountId() + "/" + configuration.getQueueName();
        } else if (configuration.getQueueOwnerAWSAccountId() != null) {
            GetQueueUrlRequest getQueueUrlRequest = new GetQueueUrlRequest();
            getQueueUrlRequest.setQueueName(configuration.getQueueName());
            getQueueUrlRequest.setQueueOwnerAWSAccountId(configuration.getQueueOwnerAWSAccountId());
            GetQueueUrlResult getQueueUrlResult = client.getQueueUrl(getQueueUrlRequest);
            queueUrl = getQueueUrlResult.getQueueUrl();
        } else {
            // check whether the queue already exists
            ListQueuesResult listQueuesResult = client.listQueues();
            for (String url : listQueuesResult.getQueueUrls()) {
                if (url.endsWith("/" + configuration.getQueueName())) {
View Full Code Here

                +  configuration.getQueueOwnerAWSAccountId() + "/" + configuration.getQueueName();
        } else if (configuration.getQueueOwnerAWSAccountId() != null) {
            GetQueueUrlRequest getQueueUrlRequest = new GetQueueUrlRequest();
            getQueueUrlRequest.setQueueName(configuration.getQueueName());
            getQueueUrlRequest.setQueueOwnerAWSAccountId(configuration.getQueueOwnerAWSAccountId());
            GetQueueUrlResult getQueueUrlResult = client.getQueueUrl(getQueueUrlRequest);
            queueUrl = getQueueUrlResult.getQueueUrl();
        } else {
            // check whether the queue already exists
            ListQueuesResult listQueuesResult = client.listQueues();
            for (String url : listQueuesResult.getQueueUrls()) {
                if (url.endsWith("/" + configuration.getQueueName())) {
View Full Code Here

    @Test
    public void doStartWithDifferentQueueOwner() throws Exception {

        EasyMock.expect(amazonSQSClient.getQueueUrl(new GetQueueUrlRequest("test-queue")
                            .withQueueOwnerAWSAccountId("111222333")))
            .andReturn(new GetQueueUrlResult()
                           .withQueueUrl("https://sqs.us-east-1.amazonaws.com/111222333/test-queue"));

        EasyMock.replay(amazonSQSClient);

        endpoint.getConfiguration().setQueueOwnerAWSAccountId("111222333");
View Full Code Here

    public Queue getQueueByName(String queueName) {
        checkNotNull(queueName);


        try {
            GetQueueUrlResult url = sqsClient.getQueueUrl(new GetQueueUrlRequest(queueName));
            return new Queue(queueName, url.getQueueUrl(), sqsClient);
        } catch (QueueDoesNotExistException e) {
            throw new SQSRuntimeException(String.format("Queue \"%s\" does not exist.", queueName), e);
        } catch (AmazonServiceException e) {
            throw new SQSRuntimeException("AWS exception.",  e);
        }
View Full Code Here

        if (configuration.getQueueOwnerAWSAccountId() != null) {
            GetQueueUrlRequest getQueueUrlRequest = new GetQueueUrlRequest();
            getQueueUrlRequest.setQueueName(configuration.getQueueName());
            getQueueUrlRequest.setQueueOwnerAWSAccountId(configuration.getQueueOwnerAWSAccountId());
            GetQueueUrlResult getQueueUrlResult = client.getQueueUrl(getQueueUrlRequest);
            queueUrl = getQueueUrlResult.getQueueUrl();
        } else {
            // check whether the queue already exists
            ListQueuesResult listQueuesResult = client.listQueues();
            for (String url : listQueuesResult.getQueueUrls()) {
                if (url.endsWith("/" + configuration.getQueueName())) {
View Full Code Here

TOP

Related Classes of com.amazonaws.services.sqs.model.GetQueueUrlResult

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.