Package 

Class DomainStore

  • All Implemented Interfaces:
    com.batch.android.core.domain.IDomainStore

    
    public class DomainStore
     implements IDomainStore
                        
    • Method Detail

      • getCurrentDomain

        @NonNull() String getCurrentDomain()

        Determines the current domain.

        This domain is typically the one being used in the app for performing operations.

      • updateDomain

         void updateDomain(@Nullable() String domain)

        Updates the current domain with a new provided domain.

        If {@code domain} is null, it resets the domain to {@code DomainStore.DNS_DOMAIN_ORIGINAL}.

        Parameters:
        domain - The new domain to set, or null to reset to the original domain.
      • incrementErrorCount

         int incrementErrorCount()

        Increments the error count and returns the new error count value.

        Used to track the number of errors related to the domain.

      • resetDomainToOriginal

         void resetDomainToOriginal()

        Resets the domain to its original value {@code DomainStore.DNS_DOMAIN_ORIGINAL}.

      • resetErrorCountIfNeeded

         void resetErrorCountIfNeeded()

        Resets the error count if needed, for instance if a successful API call was done on the current domain.

      • isCurrentDomain

         boolean isCurrentDomain(String domain)

        Determine if the given domain is the current one