public class MessageGearsAwsClient
extends java.lang.Object
| Constructor and Description |
|---|
MessageGearsAwsClient(MessageGearsAwsProperties properties)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
java.io.File |
compressFile(java.io.File file)
Utility method to compress a given file.
|
java.lang.String |
createQueue(java.lang.String queueName)
Utility function to create an Amazon SQS queue for use by the
MessageGears platform.
|
void |
deleteS3File(java.lang.String bucketName,
java.lang.String key)
Utility function to delete a file from the user's S3 Account.
|
void |
deleteSqsMessage(com.amazonaws.services.sqs.model.DeleteMessageRequest request)
Utility function to delete a message from the user's SQS Queue.
|
void |
putS3File(java.io.InputStream inputStream,
java.lang.String bucketName,
java.lang.String key)
Utility method to upload a given @InputStream to Amazon S3 in
in the user's bucket.
|
com.amazonaws.services.sqs.model.ReceiveMessageResult |
receiveMessage(com.amazonaws.services.sqs.model.ReceiveMessageRequest request)
Utility function to pull a message from a given SQS Queue (specified in
the request).
|
public MessageGearsAwsClient(MessageGearsAwsProperties properties)
properties - The @MessageGearsAwsProperties containing the user credentials.public java.io.File compressFile(java.io.File file)
throws java.io.IOException
file - The file to be compressed using the zip algorithm.java.io.IOException - In the event that a file is not found, or cannot be created.public void putS3File(java.io.InputStream inputStream,
java.lang.String bucketName,
java.lang.String key)
inputStream - The @InputStream to upload.bucketName - The Amazon S3 bucket name to upload to.key - The key to use to identify the file (filename).public void deleteS3File(java.lang.String bucketName,
java.lang.String key)
bucketName - The bucket name containing the file to be deleted.key - The key identifying the file to be deleted.public java.lang.String createQueue(java.lang.String queueName)
queueName - A @String containing the queue name to create.public com.amazonaws.services.sqs.model.ReceiveMessageResult receiveMessage(com.amazonaws.services.sqs.model.ReceiveMessageRequest request)
request - A @ReceiveMessageRequest specifying which queue to pull from.public void deleteSqsMessage(com.amazonaws.services.sqs.model.DeleteMessageRequest request)
request - The @DeleteMessageRequest to process.Copyright © 2016. All Rights Reserved.