/** * Simplified method form for invoking the ChangeMessageVisibility operation with an AsyncHandler. * * @see #changeMessageVisibilityAsync(ChangeMessageVisibilityRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future<ChangeMessageVisibilityResult> changeMessageVisibilityAsync(String queueUrl, String receiptHandle, Integer visibilityTimeout, com.amazonaws.handlers.AsyncHandler<ChangeMessageVisibilityRequest, ChangeMessageVisibilityResult> asyncHandler) { return changeMessageVisibilityAsync( new ChangeMessageVisibilityRequest().withQueueUrl(queueUrl).withReceiptHandle(receiptHandle).withVisibilityTimeout(visibilityTimeout), asyncHandler); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getQueueUrl() == null) ? 0 : getQueueUrl().hashCode()); hashCode = prime * hashCode + ((getReceiptHandle() == null) ? 0 : getReceiptHandle().hashCode()); hashCode = prime * hashCode + ((getVisibilityTimeout() == null) ? 0 : getVisibilityTimeout().hashCode()); return hashCode; }
/** * Constructs a new ChangeMessageVisibilityRequest object. Callers should use the setter or fluent setter (with...) * methods to initialize any additional object members. * * @param queueUrl * The URL of the Amazon SQS queue whose message's visibility is changed.</p> * <p> * Queue URLs and names are case-sensitive. * @param receiptHandle * The receipt handle associated with the message whose visibility timeout is changed. This parameter is * returned by the <code> <a>ReceiveMessage</a> </code> action. * @param visibilityTimeout * The new value for the message's visibility timeout (in seconds). Values values: <code>0</code> to * <code>43200</code>. Maximum: 12 hours. */ public ChangeMessageVisibilityRequest(String queueUrl, String receiptHandle, Integer visibilityTimeout) { setQueueUrl(queueUrl); setReceiptHandle(receiptHandle); setVisibilityTimeout(visibilityTimeout); }
@Override public Future<ChangeMessageVisibilityResult> changeMessageVisibilityAsync(String queueUrl, String receiptHandle, Integer visibilityTimeout) { return changeMessageVisibilityAsync(new ChangeMessageVisibilityRequest( queueUrl, receiptHandle, visibilityTimeout)); }
Integer visibilityTimeout) throws AmazonServiceException, AmazonClientException { ChangeMessageVisibilityRequest changeMessageVisibilityRequest = new ChangeMessageVisibilityRequest(); changeMessageVisibilityRequest.setQueueUrl(queueUrl); changeMessageVisibilityRequest.setReceiptHandle(receiptHandle); changeMessageVisibilityRequest.setVisibilityTimeout(visibilityTimeout); changeMessageVisibility(changeMessageVisibilityRequest);
@Override public void changeVisibility(Integer visibilityTimeout, ResultCapture<Void> extractor) { ChangeMessageVisibilityRequest request = new ChangeMessageVisibilityRequest() .withVisibilityTimeout(visibilityTimeout); changeVisibility(request, extractor); }
for (int i = 0, n = requests.size(); i < n; i++) { entries.add(new ChangeMessageVisibilityBatchRequestEntry().withId(Integer.toString(i)) .withReceiptHandle(requests.get(i).getReceiptHandle()) .withVisibilityTimeout(requests.get(i).getVisibilityTimeout()));
public ChangeMessageVisibilityResult changeMessageVisibility(ChangeMessageVisibilityRequest changeMessageVisibilityRequest) throws AmazonServiceException, AmazonClientException { ResultConverter.appendUserAgent(changeMessageVisibilityRequest, USER_AGENT); QueueBuffer buffer = getQBuffer(changeMessageVisibilityRequest.getQueueUrl()); return buffer.changeMessageVisibilitySync(changeMessageVisibilityRequest); }
throws AmazonServiceException, AmazonClientException { if (isS3ReceiptHandle(changeMessageVisibilityRequest.getReceiptHandle())) { changeMessageVisibilityRequest.setReceiptHandle( getOrigReceiptHandle(changeMessageVisibilityRequest.getReceiptHandle()));
/** * <p> * The receipt handle associated with the message whose visibility timeout is changed. This parameter is returned by * the <code> <a>ReceiveMessage</a> </code> action. * </p> * * @param receiptHandle * The receipt handle associated with the message whose visibility timeout is changed. This parameter is * returned by the <code> <a>ReceiveMessage</a> </code> action. * @return Returns a reference to this object so that method calls can be chained together. */ public ChangeMessageVisibilityRequest withReceiptHandle(String receiptHandle) { setReceiptHandle(receiptHandle); return this; }
@Override public ChangeMessageVisibilityResult changeMessageVisibility(String queueUrl, String receiptHandle, Integer visibilityTimeout) throws AmazonServiceException, AmazonClientException { return changeMessageVisibility(new ChangeMessageVisibilityRequest(queueUrl, receiptHandle, visibilityTimeout)); }
Integer visibilityTimeout) throws AmazonServiceException, AmazonClientException { ChangeMessageVisibilityRequest changeMessageVisibilityRequest = new ChangeMessageVisibilityRequest(); changeMessageVisibilityRequest.setQueueUrl(queueUrl); changeMessageVisibilityRequest.setReceiptHandle(receiptHandle); changeMessageVisibilityRequest.setVisibilityTimeout(visibilityTimeout); changeMessageVisibility(changeMessageVisibilityRequest);
entries.add(new ChangeMessageVisibilityBatchRequestEntry() .withId(Integer.toString(i)) .withReceiptHandle(requests.get(i).getReceiptHandle()) .withVisibilityTimeout( requests.get(i).getVisibilityTimeout())); batchRequest.setEntries(entries);
public Future<ChangeMessageVisibilityResult> changeMessageVisibilityAsync(ChangeMessageVisibilityRequest changeMessageVisibilityRequest, AsyncHandler<ChangeMessageVisibilityRequest, ChangeMessageVisibilityResult> asyncHandler) throws AmazonServiceException, AmazonClientException { ResultConverter.appendUserAgent(changeMessageVisibilityRequest, USER_AGENT); QueueBuffer buffer = getQBuffer(changeMessageVisibilityRequest.getQueueUrl()); return buffer.changeMessageVisibility(changeMessageVisibilityRequest, asyncHandler); }
/** * <p> * The receipt handle associated with the message whose visibility timeout is changed. This parameter is returned by * the <code> <a>ReceiveMessage</a> </code> action. * </p> * * @param receiptHandle * The receipt handle associated with the message whose visibility timeout is changed. This parameter is * returned by the <code> <a>ReceiveMessage</a> </code> action. * @return Returns a reference to this object so that method calls can be chained together. */ public ChangeMessageVisibilityRequest withReceiptHandle(String receiptHandle) { setReceiptHandle(receiptHandle); return this; }
@Override public ChangeMessageVisibilityResult changeMessageVisibility(String queueUrl, String receiptHandle, Integer visibilityTimeout) { return changeMessageVisibility(new ChangeMessageVisibilityRequest().withQueueUrl(queueUrl).withReceiptHandle(receiptHandle) .withVisibilityTimeout(visibilityTimeout)); }
@Override public Future<ChangeMessageVisibilityResult> changeMessageVisibilityAsync(String queueUrl, String receiptHandle, Integer visibilityTimeout, AsyncHandler<ChangeMessageVisibilityRequest, ChangeMessageVisibilityResult> asyncHandler) { return changeMessageVisibilityAsync(new ChangeMessageVisibilityRequest( queueUrl, receiptHandle, visibilityTimeout), asyncHandler); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ChangeMessageVisibilityRequest == false) return false; ChangeMessageVisibilityRequest other = (ChangeMessageVisibilityRequest) obj; if (other.getQueueUrl() == null ^ this.getQueueUrl() == null) return false; if (other.getQueueUrl() != null && other.getQueueUrl().equals(this.getQueueUrl()) == false) return false; if (other.getReceiptHandle() == null ^ this.getReceiptHandle() == null) return false; if (other.getReceiptHandle() != null && other.getReceiptHandle().equals(this.getReceiptHandle()) == false) return false; if (other.getVisibilityTimeout() == null ^ this.getVisibilityTimeout() == null) return false; if (other.getVisibilityTimeout() != null && other.getVisibilityTimeout().equals(this.getVisibilityTimeout()) == false) return false; return true; }
/** * Constructs a new ChangeMessageVisibilityRequest object. Callers should * use the setter or fluent setter (with...) methods to initialize any * additional object members. * * @param queueUrl <p> * The URL of the Amazon SQS queue to take action on. * </p> * <p> * Queue URLs are case-sensitive. * </p> * @param receiptHandle <p> * The receipt handle associated with the message whose * visibility timeout should be changed. This parameter is * returned by the <a>ReceiveMessage</a> action. * </p> * @param visibilityTimeout <p> * The new value (in seconds - from 0 to 43200 - maximum 12 * hours) for the message's visibility timeout. * </p> */ public ChangeMessageVisibilityRequest(String queueUrl, String receiptHandle, Integer visibilityTimeout) { setQueueUrl(queueUrl); setReceiptHandle(receiptHandle); setVisibilityTimeout(visibilityTimeout); }
for (int i = 0, n = requests.size(); i < n; i++) { entries.add(new ChangeMessageVisibilityBatchRequestEntry().withId(Integer.toString(i)) .withReceiptHandle(requests.get(i).getReceiptHandle()) .withVisibilityTimeout(requests.get(i).getVisibilityTimeout()));