@ConfigurationProperties(prefix="okhttp") public class OkHttpProperties extends Object
Modifier and Type | Class and Description |
---|---|
static class |
OkHttpProperties.CacheProperties |
static class |
OkHttpProperties.ConnectionPoolProperties |
Constructor and Description |
---|
OkHttpProperties() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
OkHttpProperties.CacheProperties |
getCache() |
OkHttpProperties.ConnectionPoolProperties |
getConnectionPool() |
Duration |
getConnectTimeout()
The default connect timeout for new connections.
|
Duration |
getPingInterval()
The interval between web socket pings initiated by this client.
|
Duration |
getReadTimeout()
The default read timeout for new connections.
|
Duration |
getWriteTimeout()
The default write timeout for new connections.
|
int |
hashCode() |
boolean |
isFollowRedirects()
Whether to follow redirects.
|
boolean |
isFollowSslRedirects()
Whether to follow redirects from HTTPS to HTTP and from HTTP to HTTPS.
|
boolean |
isRetryOnConnectionFailure()
Whether to retry or not when a connectivity problem is encountered.
|
void |
setCache(OkHttpProperties.CacheProperties cache) |
void |
setConnectTimeout(Duration connectTimeout)
The default connect timeout for new connections.
|
void |
setFollowRedirects(boolean followRedirects)
Whether to follow redirects.
|
void |
setFollowSslRedirects(boolean followSslRedirects)
Whether to follow redirects from HTTPS to HTTP and from HTTP to HTTPS.
|
void |
setPingInterval(Duration pingInterval)
The interval between web socket pings initiated by this client.
|
void |
setReadTimeout(Duration readTimeout)
The default read timeout for new connections.
|
void |
setRetryOnConnectionFailure(boolean retryOnConnectionFailure)
Whether to retry or not when a connectivity problem is encountered.
|
void |
setWriteTimeout(Duration writeTimeout)
The default write timeout for new connections.
|
String |
toString() |
public OkHttpProperties()
public Duration getConnectTimeout()
public Duration getReadTimeout()
public Duration getWriteTimeout()
public Duration getPingInterval()
The default value of 0 disables client-initiated pings.
public OkHttpProperties.CacheProperties getCache()
public boolean isFollowSslRedirects()
public boolean isFollowRedirects()
public boolean isRetryOnConnectionFailure()
public OkHttpProperties.ConnectionPoolProperties getConnectionPool()
public void setConnectTimeout(Duration connectTimeout)
public void setReadTimeout(Duration readTimeout)
public void setWriteTimeout(Duration writeTimeout)
public void setPingInterval(Duration pingInterval)
The default value of 0 disables client-initiated pings.
public void setCache(OkHttpProperties.CacheProperties cache)
public void setFollowSslRedirects(boolean followSslRedirects)
public void setFollowRedirects(boolean followRedirects)
public void setRetryOnConnectionFailure(boolean retryOnConnectionFailure)