Package com.avoka.fc.core.sysevent
Class AWSServiceClient
java.lang.Object
com.avoka.fc.core.sysevent.ServiceClient
com.avoka.fc.core.sysevent.AWSServiceClient
Provides AWS SQS service client for use with the System Event Publisher
- Since:
- 20.05.0
-
Nested Class Summary
Nested classes/interfaces inherited from class com.avoka.fc.core.sysevent.ServiceClient
ServiceClient.ServiceClientType
-
Field Summary
Fields inherited from class com.avoka.fc.core.sysevent.ServiceClient
configHash, credentialsExpiry, queueUrlMap
-
Constructor Summary
ConstructorDescriptionAWSServiceClient
(com.amazonaws.services.sqs.AmazonSQS amazonSQS, Date credentialsExpiry, String configHash) -
Method Summary
Modifier and TypeMethodDescriptionvoid
createQueue
(String queueName) Creates a queue in the cloud instance using the name queueNamegetQueueUrlForQueueName
(String queueName) For a given queueName will return the URLWill return the type of the Service Client instance, i.e.boolean
isExistingQueue
(String queueName) For a given queueName will return true if it existsvoid
sendMessage
(String queueURL, String msg) Will send a message 'msg' to the specified queueUrlMethods inherited from class com.avoka.fc.core.sysevent.ServiceClient
getConfigHash, getCredentialsExpiryDate, getQueueUrlMap
-
Constructor Details
-
AWSServiceClient
-
-
Method Details
-
createQueue
Description copied from class:ServiceClient
Creates a queue in the cloud instance using the name queueName- Specified by:
createQueue
in classServiceClient
- Parameters:
queueName
- to create
-
getQueueUrlForQueueName
Description copied from class:ServiceClient
For a given queueName will return the URL- Specified by:
getQueueUrlForQueueName
in classServiceClient
- Parameters:
queueName
- for the url- Returns:
- url if queueName found else null
-
getServiceClientType
Description copied from class:ServiceClient
Will return the type of the Service Client instance, i.e. (AWS, Azure, etc)- Specified by:
getServiceClientType
in classServiceClient
- Returns:
- serviceClientType of instance
-
isExistingQueue
Description copied from class:ServiceClient
For a given queueName will return true if it exists- Specified by:
isExistingQueue
in classServiceClient
- Parameters:
queueName
- to determine if exists- Returns:
- true if it exists else false
-
sendMessage
Description copied from class:ServiceClient
Will send a message 'msg' to the specified queueUrl- Specified by:
sendMessage
in classServiceClient
- Parameters:
queueURL
- to receive the messagemsg
- to send
-