Builder

class Builder

A builder to create and configure an ArcGISHttpClient instance.

Since

200.2.0

See also

ArcGISHttpClient.builder

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Sets the cache to a cache with the provided maxSize and DEFAULT_HTTP_CACHE_LOCATION as the location.

fun cache(directory: File, maxSize: Long = DEFAULT_HTTP_CACHE_SIZE): ArcGISHttpClient.Builder

Sets the HTTP cache to a cache with the provided directory and maxSize.

Link copied to clipboard

Sets the default connect timeout for new connections. A value of Duration.INFINITE means no timeout, otherwise values must be between 1 and Integer.MAX_VALUE when converted to milliseconds or an exception will be thrown. The connect timeout is applied when connecting a TCP socket to the target host. The default value is 10 seconds.

Link copied to clipboard

Adds the provided Interceptor. This allows user code to intercept any network requests executed by the ArcGISHttpClient created with this builder. Interceptors will be invoked in the order they are added.

Link copied to clipboard

Sets the default read timeout for new connections. A value of Duration.INFINITE means no timeout, otherwise values must be between 1 and Integer.MAX_VALUE when converted to milliseconds or an exception will be thrown. The read timeout is applied to both the TCP socket and for individual read IO operations. The default value is 60 seconds.

Link copied to clipboard

Sets the default write timeout for new connections. A value of Duration.INFINITE means no timeout, otherwise values must be between 1 and Integer.MAX_VALUE when converted to milliseconds or an exception will be thrown. The write timeout is applied for individual write IO operations. The default value is 10 seconds.