Package io.freefair.spring.okhttp
Class OkHttpProperties
- java.lang.Object
-
- io.freefair.spring.okhttp.OkHttpProperties
-
@ConfigurationProperties(prefix="okhttp") public class OkHttpProperties extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OkHttpProperties.Cache
static class
OkHttpProperties.ConnectionPoolProperties
-
Constructor Summary
Constructors Constructor Description OkHttpProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
OkHttpProperties.Cache
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.Cache 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()
-
-
-
Method Detail
-
getConnectTimeout
public Duration getConnectTimeout()
The default connect timeout for new connections.
-
getReadTimeout
public Duration getReadTimeout()
The default read timeout for new connections.
-
getWriteTimeout
public Duration getWriteTimeout()
The default write timeout for new connections.
-
getPingInterval
public Duration getPingInterval()
The interval between web socket pings initiated by this client. Use this to automatically send web socket ping frames until either the web socket fails or it is closed. This keeps the connection alive and may detect connectivity failures early. No timeouts are enforced on the acknowledging pongs.The default value of 0 disables client-initiated pings.
-
getCache
public OkHttpProperties.Cache getCache()
-
isFollowSslRedirects
public boolean isFollowSslRedirects()
Whether to follow redirects from HTTPS to HTTP and from HTTP to HTTPS.
-
isFollowRedirects
public boolean isFollowRedirects()
Whether to follow redirects.
-
isRetryOnConnectionFailure
public boolean isRetryOnConnectionFailure()
Whether to retry or not when a connectivity problem is encountered.
-
getConnectionPool
public OkHttpProperties.ConnectionPoolProperties getConnectionPool()
-
setConnectTimeout
public void setConnectTimeout(Duration connectTimeout)
The default connect timeout for new connections.
-
setReadTimeout
public void setReadTimeout(Duration readTimeout)
The default read timeout for new connections.
-
setWriteTimeout
public void setWriteTimeout(Duration writeTimeout)
The default write timeout for new connections.
-
setPingInterval
public void setPingInterval(Duration pingInterval)
The interval between web socket pings initiated by this client. Use this to automatically send web socket ping frames until either the web socket fails or it is closed. This keeps the connection alive and may detect connectivity failures early. No timeouts are enforced on the acknowledging pongs.The default value of 0 disables client-initiated pings.
-
setCache
public void setCache(OkHttpProperties.Cache cache)
-
setFollowSslRedirects
public void setFollowSslRedirects(boolean followSslRedirects)
Whether to follow redirects from HTTPS to HTTP and from HTTP to HTTPS.
-
setFollowRedirects
public void setFollowRedirects(boolean followRedirects)
Whether to follow redirects.
-
setRetryOnConnectionFailure
public void setRetryOnConnectionFailure(boolean retryOnConnectionFailure)
Whether to retry or not when a connectivity problem is encountered.
-
canEqual
protected boolean canEqual(Object other)
-
-