List of usage examples for com.amazonaws.services.sqs.model GetQueueUrlResult GetQueueUrlResult
GetQueueUrlResult
From source file:org.flite.mock.amazonaws.sqs.AmazonSQSMock.java
License:Open Source License
public GetQueueUrlResult getQueueUrl(final GetQueueUrlRequest request) throws AmazonServiceException, AmazonClientException { if (request == null) { throw new AmazonClientException("Null GetQueueUrlRequest"); }/*from ww w . ja v a 2 s . co m*/ final String queueName = request.getQueueName(); final String queueUrl = QUEUE_URL_PREFIX + queueName; checkURLForException(queueUrl); // Per documentation, supposedly throws QueueDoesNotExistException, // but in my tests, they actually just throw AmazonServiceException if (!allQueues.containsKey(queueUrl)) { throw new AmazonServiceException("Queue Not Found: " + queueUrl); } return new GetQueueUrlResult().withQueueUrl(queueUrl); }