public static class StitchClientConfiguration.Builder extends Object
StitchClientConfiguration
object.Constructor and Description |
---|
Builder()
Constructs a new builder.
|
Modifier and Type | Method and Description |
---|---|
StitchClientConfiguration |
build()
Builds the
StitchAppClientConfiguration . |
String |
getBaseUrl()
Gets the base URL of the Stitch server that the client will communicate with.
|
CodecRegistry |
getCodecRegistry()
Gets the codec registry used to encode/decode JSON.
|
String |
getDataDirectory()
Gets the local directory in which Stitch can store any data (e.g.
|
Long |
getDefaultRequestTimeout()
Gets the number of milliseconds that a `Transport` should spend by default on an HTTP round
trip before failing with an error.
|
NetworkMonitor |
getNetworkMonitor()
Gets the
NetworkMonitor that the client will used to check internet status. |
Storage |
getStorage()
Gets the underlying storage to persist client specific data to.
|
Transport |
getTransport()
Gets the
Transport that the client will use to make round trips to the Stitch server. |
StitchClientConfiguration.Builder |
withBaseUrl(String baseUrl)
Sets the base URL of the Stitch server that the client will communicate with.
|
StitchClientConfiguration.Builder |
withCodecRegistry(CodecRegistry codecRegistry)
Merges the provided codec registry with the default codec registry.
|
StitchClientConfiguration.Builder |
withDataDirectory(String dataDirectory)
Sets the local directory in which Stitch can store any data (e.g.
|
StitchClientConfiguration.Builder |
withDefaultRequestTimeout(Long defaultRequestTimeout)
Sets the number of milliseconds that a `Transport` should spend by default on an HTTP round
trip before failing with an error.
|
StitchClientConfiguration.Builder |
withNetworkMonitor(NetworkMonitor networkMonitor)
Sets the
NetworkMonitor that the client will used to check internet status. |
StitchClientConfiguration.Builder |
withStorage(Storage storage)
Sets the underlying storage to persist client specific data to.
|
StitchClientConfiguration.Builder |
withTransport(Transport transport)
Sets the
Transport that the client will use to make round trips to the Stitch server. |
public StitchClientConfiguration.Builder withBaseUrl(String baseUrl)
baseUrl
- the base URL of the Stitch server that the client will communicate with.public StitchClientConfiguration.Builder withStorage(Storage storage)
storage
- the underlying storage to persist client specific data to.public StitchClientConfiguration.Builder withDataDirectory(String dataDirectory)
dataDirectory
- the local directory in which Stitch can store any data.public StitchClientConfiguration.Builder withTransport(Transport transport)
Transport
that the client will use to make round trips to the Stitch server.transport
- the Transport
that the client will use to make round trips to the
Stitch server.public StitchClientConfiguration.Builder withDefaultRequestTimeout(Long defaultRequestTimeout)
defaultRequestTimeout
- the number of milliseconds that a `Transport` should spend by
default on an HTTP round trip before failing with an error.public StitchClientConfiguration.Builder withCodecRegistry(CodecRegistry codecRegistry)
codecRegistry
- the codec registry to merge with the default registry.public StitchClientConfiguration.Builder withNetworkMonitor(NetworkMonitor networkMonitor)
NetworkMonitor
that the client will used to check internet status.networkMonitor
- the NetworkMonitor
that the client will use check internet
status.public String getBaseUrl()
public String getDataDirectory()
public Storage getStorage()
public Transport getTransport()
Transport
that the client will use to make round trips to the Stitch server.Transport
that the client will use to make round trips to the Stitch
server.public Long getDefaultRequestTimeout()
public CodecRegistry getCodecRegistry()
public NetworkMonitor getNetworkMonitor()
NetworkMonitor
that the client will used to check internet status.NetworkMonitor
that the client will used to check internet status.public StitchClientConfiguration build()
StitchAppClientConfiguration
.StitchAppClientConfiguration
.