Emitter

class Emitter(context: Context, collectorUri: String, builder: (Emitter) -> Unit? = null)

Build an emitter object which controls the sending of events to the Snowplow Collector.

Constructors

Link copied to clipboard
fun Emitter(context: Context, collectorUri: String, builder: (Emitter) -> Unit? = null)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun add(payload: Payload)

Adds a payload to the EventStore and then attempts to start the emitter if it is not currently running.

Link copied to clipboard
fun flush()

Attempts to start the emitter if it is not currently running.

Link copied to clipboard
fun pauseEmit()

Pause emitting events.

Link copied to clipboard

Resume emitting events and attempt to emit any queued events.

Link copied to clipboard
fun shutdown()
fun shutdown(timeout: Long): Boolean

Resets the isRunning truth to false and shutdown.

Properties

Link copied to clipboard

The buffer option selected for the emitter

Link copied to clipboard

The GET byte limit

Link copied to clipboard

The POST byte limit

Link copied to clipboard
var client: OkHttpClient? = null
Link copied to clipboard
var cookieJar: CookieJar? = null
Link copied to clipboard
var customPostPath: String? = null

The customPostPath for the Emitter

Link copied to clipboard

The emitter status

Link copied to clipboard

The emitter tick. This configuration option is not published in the EmitterConfiguration class. Create an Emitter and Tracker directly, not via the Snowplow interface, to configure emitterTick.

Link copied to clipboard

The URI for the Emitter

Link copied to clipboard

The maximum timeout for emitting events. If emit time exceeds this value TimeOutException will be thrown.

Link copied to clipboard

The amount of times the event store can be empty before it is shut down. This configuration option is not published in the EmitterConfiguration class. Create an Emitter and Tracker directly, not via the Snowplow interface, to configure emptyLimit.

Link copied to clipboard
var eventStore: EventStore? = null

The emitter event store object

Link copied to clipboard

The Emitters request method

Link copied to clipboard
var namespace: String? = null

Emitter namespace. NB: setting the namespace has a side-effect of creating the SQLiteEventStore

Link copied to clipboard

The NetworkConnection if it exists

Link copied to clipboard
Link copied to clipboard

The request security selected for the emitter

Link copied to clipboard

The maximum amount of events to grab for an emit attempt.

Link copied to clipboard

Whether to anonymise server-side user identifiers including the network_userid and user_ipaddress

Link copied to clipboard
Link copied to clipboard

This configuration option is not published in the EmitterConfiguration class. Create an Emitter and Tracker directly, not via the Snowplow interface, to configure timeUnit.

Link copied to clipboard

This configuration option is not published in the EmitterConfiguration class. Create an Emitter and Tracker directly, not via the Snowplow interface, to configure tlsVersions.