Package com.avoka.fc.core.sysevent
Class AWSServiceClient
- java.lang.Object
-
- com.avoka.fc.core.sysevent.ServiceClient
-
- com.avoka.fc.core.sysevent.AWSServiceClient
-
public class AWSServiceClient extends ServiceClient
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
Constructors Constructor Description AWSServiceClient(com.amazonaws.services.sqs.AmazonSQS amazonSQS, Date credentialsExpiry, String configHash)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateQueue(String queueName)Creates a queue in the cloud instance using the name queueNameStringgetQueueUrlForQueueName(String queueName)For a given queueName will return the URLServiceClient.ServiceClientTypegetServiceClientType()Will return the type of the Service Client instance, i.e.booleanisExistingQueue(String queueName)For a given queueName will return true if it existsvoidsendMessage(String queueURL, String msg)Will send a message 'msg' to the specified queueUrl-
Methods inherited from class com.avoka.fc.core.sysevent.ServiceClient
getConfigHash, getCredentialsExpiryDate, getQueueUrlMap
-
-
-
-
Method Detail
-
createQueue
public void createQueue(String queueName)
Description copied from class:ServiceClientCreates a queue in the cloud instance using the name queueName- Specified by:
createQueuein classServiceClient- Parameters:
queueName- to create
-
getQueueUrlForQueueName
public String getQueueUrlForQueueName(String queueName)
Description copied from class:ServiceClientFor a given queueName will return the URL- Specified by:
getQueueUrlForQueueNamein classServiceClient- Parameters:
queueName- for the url- Returns:
- url if queueName found else null
-
getServiceClientType
public ServiceClient.ServiceClientType getServiceClientType()
Description copied from class:ServiceClientWill return the type of the Service Client instance, i.e. (AWS, Azure, etc)- Specified by:
getServiceClientTypein classServiceClient- Returns:
- serviceClientType of instance
-
isExistingQueue
public boolean isExistingQueue(String queueName)
Description copied from class:ServiceClientFor a given queueName will return true if it exists- Specified by:
isExistingQueuein classServiceClient- Parameters:
queueName- to determine if exists- Returns:
- true if it exists else false
-
sendMessage
public void sendMessage(String queueURL, String msg)
Description copied from class:ServiceClientWill send a message 'msg' to the specified queueUrl- Specified by:
sendMessagein classServiceClient- Parameters:
queueURL- to receive the messagemsg- to send
-
-