Package com.avoka.fc.core.sysevent
Class ServiceClient
- java.lang.Object
-
- com.avoka.fc.core.sysevent.ServiceClient
-
- Direct Known Subclasses:
AWSServiceClient,AzureServiceClient
public abstract class ServiceClient extends Object
Provides an implementation for cloud instances for use when send messages from the System Event Publisher- Since:
- 20.05.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classServiceClient.ServiceClientType
-
Field Summary
Fields Modifier and Type Field Description protected StringconfigHashprotected DatecredentialsExpiryprotected Map<String,String>queueUrlMap
-
Constructor Summary
Constructors Constructor Description ServiceClient()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidcreateQueue(String queueName)Creates a queue in the cloud instance using the name queueNameStringgetConfigHash()Returns the unique identifying hash of the Service ClientDategetCredentialsExpiryDate()Returns the expiry date when of the Service Clientabstract StringgetQueueUrlForQueueName(String queueName)For a given queueName will return the URLMap<String,String>getQueueUrlMap()Returns the queueUrlMap which is maps each queueUrl to the queueNameabstract ServiceClient.ServiceClientTypegetServiceClientType()Will return the type of the Service Client instance, i.e.abstract booleanisExistingQueue(String queueName)For a given queueName will return true if it existsabstract voidsendMessage(String queueURL, String msg)Will send a message 'msg' to the specified queueUrl
-
-
-
Method Detail
-
createQueue
public abstract void createQueue(String queueName)
Creates a queue in the cloud instance using the name queueName- Parameters:
queueName- to create
-
getQueueUrlForQueueName
public abstract String getQueueUrlForQueueName(String queueName)
For a given queueName will return the URL- Parameters:
queueName- for the url- Returns:
- url if queueName found else null
-
getServiceClientType
public abstract ServiceClient.ServiceClientType getServiceClientType()
Will return the type of the Service Client instance, i.e. (AWS, Azure, etc)- Returns:
- serviceClientType of instance
-
isExistingQueue
public abstract boolean isExistingQueue(String queueName)
For a given queueName will return true if it exists- Parameters:
queueName- to determine if exists- Returns:
- true if it exists else false
-
sendMessage
public abstract void sendMessage(String queueURL, String msg)
Will send a message 'msg' to the specified queueUrl- Parameters:
queueURL- to receive the messagemsg- to send
-
getCredentialsExpiryDate
public Date getCredentialsExpiryDate()
Returns the expiry date when of the Service Client- Returns:
- date expiryDate
-
getConfigHash
public String getConfigHash()
Returns the unique identifying hash of the Service Client- Returns:
- configHash for the Service Client
-
-