Snowplow Android Tracker 3.1.2
Public Member Functions | Public Attributes | List of all members
com.snowplowanalytics.snowplow.configuration.NetworkConfiguration Class Reference
Inheritance diagram for com.snowplowanalytics.snowplow.configuration.NetworkConfiguration:
com.snowplowanalytics.snowplow.internal.emitter.NetworkConfigurationInterface com.snowplowanalytics.snowplow.configuration.Configuration

Public Member Functions

 NetworkConfiguration (@NonNull String endpoint)
 
 NetworkConfiguration (@NonNull String endpoint, @NonNull HttpMethod method)
 
 NetworkConfiguration (@NonNull NetworkConnection networkConnection)
 
String getEndpoint ()
 
HttpMethod getMethod ()
 
Protocol getProtocol ()
 
String getCustomPostPath ()
 
Integer getTimeout ()
 
NetworkConnection getNetworkConnection ()
 
OkHttpClient getOkHttpClient ()
 
NetworkConfiguration customPostPath (@NonNull String customPostPath)
 
NetworkConfiguration timeout (@NonNull Integer timeout)
 
NetworkConfiguration okHttpClient (@NonNull OkHttpClient okHttpClient)
 
Configuration copy ()
 
 NetworkConfiguration (@NonNull JSONObject jsonObject)
 

Public Attributes

NetworkConnection networkConnection
 
String customPostPath
 
Integer timeout
 
OkHttpClient okHttpClient
 

Detailed Description

Represents the network communication configuration allowing the tracker to be able to send events to the Snowplow collector.

Definition at line 24 of file NetworkConfiguration.java.

Constructor & Destructor Documentation

◆ NetworkConfiguration() [1/4]

com.snowplowanalytics.snowplow.configuration.NetworkConfiguration.NetworkConfiguration ( @NonNull String  endpoint)
Parameters
endpointURL of the collector that is going to receive the events tracked by the tracker. The URL can include the schema/protocol (e.g.: http://collector-url.com). In case the URL doesn't include the schema/protocol, the HTTPS protocol is automatically selected.

Definition at line 66 of file NetworkConfiguration.java.

◆ NetworkConfiguration() [2/4]

com.snowplowanalytics.snowplow.configuration.NetworkConfiguration.NetworkConfiguration ( @NonNull String  endpoint,
@NonNull HttpMethod  method 
)
Parameters
endpointURL of the collector that is going to receive the events tracked by the tracker. The URL can include the schema/protocol (e.g.: http://collector-url.com). In case the URL doesn't include the schema/protocol, the HTTPS protocol is automatically selected.
methodThe method used to send the requests (GET or POST).

Definition at line 77 of file NetworkConfiguration.java.

◆ NetworkConfiguration() [3/4]

com.snowplowanalytics.snowplow.configuration.NetworkConfiguration.NetworkConfiguration ( @NonNull NetworkConnection  networkConnection)
Parameters
networkConnectionThe NetworkConnection component which will control the communication between the tracker and the collector.

Definition at line 107 of file NetworkConfiguration.java.

◆ NetworkConfiguration() [4/4]

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

Definition at line 219 of file NetworkConfiguration.java.

Member Function Documentation

◆ copy()

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

◆ customPostPath()

NetworkConfiguration com.snowplowanalytics.snowplow.configuration.NetworkConfiguration.customPostPath ( @NonNull String  customPostPath)

A custom path which will be added to the endpoint URL to specify the complete URL of the collector when paired with the POST method.

Definition at line 172 of file NetworkConfiguration.java.

◆ getCustomPostPath()

String com.snowplowanalytics.snowplow.configuration.NetworkConfiguration.getCustomPostPath ( )

◆ getEndpoint()

String com.snowplowanalytics.snowplow.configuration.NetworkConfiguration.getEndpoint ( )
Returns
URL (without schema/protocol) used to send events to the collector.

Implements com.snowplowanalytics.snowplow.internal.emitter.NetworkConfigurationInterface.

Definition at line 119 of file NetworkConfiguration.java.

◆ getMethod()

HttpMethod com.snowplowanalytics.snowplow.configuration.NetworkConfiguration.getMethod ( )
Returns
Method used to send events to the collector.

Implements com.snowplowanalytics.snowplow.internal.emitter.NetworkConfigurationInterface.

Definition at line 128 of file NetworkConfiguration.java.

◆ getNetworkConnection()

NetworkConnection com.snowplowanalytics.snowplow.configuration.NetworkConfiguration.getNetworkConnection ( )

◆ getOkHttpClient()

OkHttpClient com.snowplowanalytics.snowplow.configuration.NetworkConfiguration.getOkHttpClient ( )

◆ getProtocol()

Protocol com.snowplowanalytics.snowplow.configuration.NetworkConfiguration.getProtocol ( )
Returns
Protocol used to send events to the collector.

Implements com.snowplowanalytics.snowplow.internal.emitter.NetworkConfigurationInterface.

Definition at line 137 of file NetworkConfiguration.java.

◆ getTimeout()

Integer com.snowplowanalytics.snowplow.configuration.NetworkConfiguration.getTimeout ( )

◆ okHttpClient()

NetworkConfiguration com.snowplowanalytics.snowplow.configuration.NetworkConfiguration.okHttpClient ( @NonNull OkHttpClient  okHttpClient)

An OkHttp client that will be used in the emitter, you can provide your own if you want to share your Singleton client's interceptors, connection pool etc.. Otherwise a new one is created.

Definition at line 192 of file NetworkConfiguration.java.

◆ timeout()

NetworkConfiguration com.snowplowanalytics.snowplow.configuration.NetworkConfiguration.timeout ( @NonNull Integer  timeout)

The timeout set for the requests to the collector.

Definition at line 181 of file NetworkConfiguration.java.

Member Data Documentation

◆ customPostPath

String com.snowplowanalytics.snowplow.configuration.NetworkConfiguration.customPostPath
See also
#customPostPath(String)

Definition at line 44 of file NetworkConfiguration.java.

◆ networkConnection

NetworkConnection com.snowplowanalytics.snowplow.configuration.NetworkConfiguration.networkConnection
See also
#NetworkConfiguration(NetworkConnection)

Definition at line 38 of file NetworkConfiguration.java.

◆ okHttpClient

OkHttpClient com.snowplowanalytics.snowplow.configuration.NetworkConfiguration.okHttpClient
See also
#okHttpClient(OkHttpClient)

Definition at line 56 of file NetworkConfiguration.java.

◆ timeout

Integer com.snowplowanalytics.snowplow.configuration.NetworkConfiguration.timeout
See also
#timeout(Integer)

Definition at line 50 of file NetworkConfiguration.java.


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