SudoAdTrackerBlockerClient

Interface encapsulating a library for interacting with the Sudo Ad Tracker Blocker service.

Samples

com.sudoplatform.sudoadtrackerblocker.samples.Samples.buildClient

Types

Link copied to clipboard
class Builder

Builder used to construct the SudoAdTrackerBlockerClient.

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract suspend fun addExceptions(vararg exceptions: BlockingException)

Adds an entry to the set of exceptions. This method does not return until the new exceptions have been compiled and the filtering engine is ready.

Link copied to clipboard
abstract suspend fun checkUrl(url: String, sourceUrl: String? = null, resourceType: String? = null): SudoAdTrackerBlockerClient.CheckUrlResult

Checks a URL to determine if it is blocked according to current configuration.

Link copied to clipboard
abstract suspend fun clearStorage()

Delete all cached data and clear the active Rulesets.

Link copied to clipboard
abstract fun close()
Link copied to clipboard
abstract suspend fun getActiveRulesets(): Array<Ruleset.Type>

Returns the active Rulesets.

Link copied to clipboard
abstract suspend fun getExceptions(): Set<BlockingException>

Gets the set of blocking exceptions that prevent URLs from being blocked. These are the URLs that are to be allowed even if the active rulesets say they should be blocked.

Link copied to clipboard
abstract suspend fun listRulesets(): List<Ruleset>

List the available Rulesets from the service.

Link copied to clipboard
abstract suspend fun removeAllExceptions()

Removes all the entries from the set of exceptions. This method does not return until the new exceptions have been compiled and the filtering engine is ready.

Link copied to clipboard
abstract suspend fun removeExceptions(vararg exceptions: BlockingException)

Removes an entry from the set of exceptions. This method does not return until the new exceptions have been compiled and the filtering engine is ready.

Link copied to clipboard
abstract suspend fun setActiveRulesets(activeRulesets: Array<Ruleset.Type> = noRulesets())
abstract suspend fun setActiveRulesets(activeRuleset: Ruleset.Type, vararg moreActiveRulesets: Ruleset.Type = emptyArray())

Sets which Rulesets are active. This method does not return until the new rules have been compiled and the filtering engine is ready. updateRulesets must be called to update the local copy of the Rulesets before this method is called for the very first time.

Link copied to clipboard
abstract suspend fun updateRulesets(vararg rulesetTypes: Ruleset.Type = allRulesets())

Request the Rulesets are updated from the service. This method must be called to update the local copy of the Rulesets before any Rulesets are made active by a call to setActiveRulesets.

Properties

Link copied to clipboard
abstract val ENTITLEMENT_NAME: String
Link copied to clipboard

The status of the filter engine.