Snowplow Android Tracker 3.1.2
Public Member Functions | Public Attributes | List of all members
com.snowplowanalytics.snowplow.configuration.SessionConfiguration Class Reference
Inheritance diagram for com.snowplowanalytics.snowplow.configuration.SessionConfiguration:
com.snowplowanalytics.snowplow.internal.session.SessionConfigurationInterface com.snowplowanalytics.snowplow.configuration.Configuration com.snowplowanalytics.snowplow.internal.session.SessionConfigurationUpdate

Public Member Functions

 SessionConfiguration (@NonNull TimeMeasure foregroundTimeout, @NonNull TimeMeasure backgroundTimeout)
 
TimeMeasure getForegroundTimeout ()
 
void setForegroundTimeout (@NonNull TimeMeasure foregroundTimeout)
 
TimeMeasure getBackgroundTimeout ()
 
void setBackgroundTimeout (@NonNull TimeMeasure backgroundTimeout)
 
Consumer< SessionStategetOnSessionUpdate ()
 
void setOnSessionUpdate (@Nullable Consumer< SessionState > onSessionUpdate)
 
SessionConfiguration onSessionUpdate (@Nullable Consumer< SessionState > onSessionUpdate)
 
Configuration copy ()
 
 SessionConfiguration (@NonNull JSONObject jsonObject)
 

Public Attributes

TimeMeasure foregroundTimeout
 
TimeMeasure backgroundTimeout
 
Consumer< SessionStateonSessionUpdate
 

Detailed Description

This class represents the configuration of the applications session. The SessionConfiguration can be used to setup the behaviour of sessions.

A session is a context which is appended to each event sent. The values it brings can change based on:

Session data is maintained for the life of the application being installed on a device. A new session will be created if the session information is not accessed within a configurable timeout.

Definition at line 27 of file SessionConfiguration.java.

Constructor & Destructor Documentation

◆ SessionConfiguration() [1/2]

com.snowplowanalytics.snowplow.configuration.SessionConfiguration.SessionConfiguration ( @NonNull TimeMeasure  foregroundTimeout,
@NonNull TimeMeasure  backgroundTimeout 
)

This will setup the session behaviour of the tracker.

Parameters
foregroundTimeoutThe timeout set for the inactivity of app when in foreground.
backgroundTimeoutThe timeout set for the inactivity of app when in background.

Definition at line 58 of file SessionConfiguration.java.

◆ SessionConfiguration() [2/2]

com.snowplowanalytics.snowplow.configuration.SessionConfiguration.SessionConfiguration ( @NonNull JSONObject  jsonObject)

Definition at line 138 of file SessionConfiguration.java.

Member Function Documentation

◆ copy()

Configuration com.snowplowanalytics.snowplow.configuration.SessionConfiguration.copy ( )

◆ getBackgroundTimeout()

TimeMeasure com.snowplowanalytics.snowplow.configuration.SessionConfiguration.getBackgroundTimeout ( )

◆ getForegroundTimeout()

TimeMeasure com.snowplowanalytics.snowplow.configuration.SessionConfiguration.getForegroundTimeout ( )

◆ getOnSessionUpdate()

Consumer< SessionState > com.snowplowanalytics.snowplow.configuration.SessionConfiguration.getOnSessionUpdate ( )

◆ onSessionUpdate()

SessionConfiguration com.snowplowanalytics.snowplow.configuration.SessionConfiguration.onSessionUpdate ( @Nullable Consumer< SessionState onSessionUpdate)
See also
onSessionUpdate

Definition at line 122 of file SessionConfiguration.java.

◆ setBackgroundTimeout()

void com.snowplowanalytics.snowplow.configuration.SessionConfiguration.setBackgroundTimeout ( @NonNull TimeMeasure  backgroundTimeout)

◆ setForegroundTimeout()

void com.snowplowanalytics.snowplow.configuration.SessionConfiguration.setForegroundTimeout ( @NonNull TimeMeasure  foregroundTimeout)

◆ setOnSessionUpdate()

void com.snowplowanalytics.snowplow.configuration.SessionConfiguration.setOnSessionUpdate ( @Nullable Consumer< SessionState onSessionUpdate)

Member Data Documentation

◆ backgroundTimeout

TimeMeasure com.snowplowanalytics.snowplow.configuration.SessionConfiguration.backgroundTimeout

The amount of time that can elapse before the session id is updated while the app is in the background.

Definition at line 43 of file SessionConfiguration.java.

◆ foregroundTimeout

TimeMeasure com.snowplowanalytics.snowplow.configuration.SessionConfiguration.foregroundTimeout

The amount of time that can elapse before the session id is updated while the app is in the foreground.

Definition at line 35 of file SessionConfiguration.java.

◆ onSessionUpdate

Consumer<SessionState> com.snowplowanalytics.snowplow.configuration.SessionConfiguration.onSessionUpdate

The callback called everytime the session is updated.

Definition at line 49 of file SessionConfiguration.java.


The documentation for this class was generated from the following file: