Example usage for com.amazonaws.services.sqs.model.transform SendMessageResultStaxUnmarshaller SendMessageResultStaxUnmarshaller

List of usage examples for com.amazonaws.services.sqs.model.transform SendMessageResultStaxUnmarshaller SendMessageResultStaxUnmarshaller

Introduction

In this page you can find the example usage for com.amazonaws.services.sqs.model.transform SendMessageResultStaxUnmarshaller SendMessageResultStaxUnmarshaller.

Prototype

SendMessageResultStaxUnmarshaller

Source Link

Usage

From source file:com.kolich.aws.services.sqs.impl.KolichSQSClient.java

License:Open Source License

@Override
public Either<HttpFailure, SendMessageResult> sendMessage(final URI queueURI, final String message) {
    return new AwsSQSHttpClosure<SendMessageResult>(client_, SC_OK, new SendMessageResultStaxUnmarshaller()) {
        @Override/* w  w w. java  2s  . c  o  m*/
        public void validate() throws Exception {
            checkNotNull(queueURI, "Queue URI cannot be null.");
            checkNotNull(message, "Message to send cannot be null.");
        }

        @Override
        public void prepare(final AwsHttpRequest request) throws Exception {
            request.addParameter(SQS_ACTION_PARAM, SQS_ACTION_SEND_MESSAGE);
            request.addParameter(SQS_MESSAGE_BODY_PARAM, message);
        }
    }.post(queueURI);
}