Class 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
    • Field Detail

      • credentialsExpiry

        protected Date credentialsExpiry
      • configHash

        protected String configHash
    • Constructor Detail

      • ServiceClient

        public ServiceClient()
    • 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 message
        msg - 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
      • getQueueUrlMap

        public Map<String,​String> getQueueUrlMap()
        Returns the queueUrlMap which is maps each queueUrl to the queueName
        Returns:
        queueUrlMap