-
- All Implemented Interfaces:
-
com.batch.android.core.domain.IDomainManager
public class DomainManager implements IDomainManager
-
-
Field Summary
Fields Modifier and Type Field Description public final static intDNS_DOMAIN_ERROR_LIMIT_COUNTpublic final static intDNS_DOMAIN_ERROR_MIN_DELAY_SECONDpublic final static List<String>domains
-
Constructor Summary
Constructors Constructor Description DomainManager(IDomainStore store)
-
Method Summary
Modifier and Type Method Description voidupdateDomainIfNeeded()Update current domain if needed voidupdateLastCheckDomainDate()Updates the date of the last check performed on the domain. voidresetDomainToOriginal()Reset current domain to the original one voidresetErrorCountIfNeeded()Resets the error count if needed, for instance if a success api call was done on the current domain. booleancanCheckOriginalDomainAvailability()Determines if the original domain can be checked for availability. Stringurl(DomainService service, boolean overrideWithOriginal)Returns the URL associated with a specific service.The `overrideWithOriginal` parameter determines whether the URL should be based on the original domain or the current domain. booleanisOriginalDomain(String domain)Determine if the given domain is the original one booleanisCurrentDomain(String domain)Determine if the given domain is the current one booleanisFeatureActivated()-
-
Constructor Detail
-
DomainManager
DomainManager(IDomainStore store)
-
-
Method Detail
-
updateDomainIfNeeded
void updateDomainIfNeeded()
Update current domain if needed
-
updateLastCheckDomainDate
void updateLastCheckDomainDate()
Updates the date of the last check performed on the domain.
-
resetDomainToOriginal
void resetDomainToOriginal()
Reset current domain to the original one
-
resetErrorCountIfNeeded
void resetErrorCountIfNeeded()
Resets the error count if needed, for instance if a success api call was done on the current domain.
-
canCheckOriginalDomainAvailability
boolean canCheckOriginalDomainAvailability()
Determines if the original domain can be checked for availability.
-
url
String url(DomainService service, boolean overrideWithOriginal)
Returns the URL associated with a specific service.The `overrideWithOriginal` parameter determines whether the URL should be based on the original domain or the current domain.
-
isOriginalDomain
boolean isOriginalDomain(String domain)
Determine if the given domain is the original one
-
isCurrentDomain
boolean isCurrentDomain(String domain)
Determine if the given domain is the current one
-
isFeatureActivated
boolean isFeatureActivated()
-
-
-
-