/tripkit/TripKitDomain/com.skedgo.tripkit.configuration/ServerManager

ServerManager

[jvm]\ object ServerManager

Singleton object that manages server configurations for the application.

This manager allows for setting and retrieving server URLs throughout the application. It provides a centralized point of configuration, making it easy to adjust server URLs for different environments (e.g., development, staging, production) or build variants.

Usage:

Example:

// Accessing default URLs
val defaultApiUrl = ServerManager.configuration.apiTripGoUrl
val defaultBigBangUrl = ServerManager.configuration.bigBangUrl

// Customizing URLs
ServerManager.customizeConfiguration(apiTripGoUrl = "https://api.newtripgo.com/v2/", bigBangUrl = "https://new.bigbang.url/")

Note: Customizations to the server URLs should ideally be done during application initialization to ensure consistent use of the URLs throughout the application lifecycle.

Properties

Name Summary
configuration [jvm]
var configuration: ServerConfiguration

Functions

Name Summary
setCustomConfiguration [jvm]
fun setCustomConfiguration(apiTripGoUrl: String? = null, bigBangUrl: String? = null)