Package io.freefair.spring.okhttp
Class OkHttpProperties
- java.lang.Object
-
- io.freefair.spring.okhttp.OkHttpProperties
-
@ConfigurationProperties(prefix="okhttp") public class OkHttpProperties extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OkHttpProperties.CacheProperties
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(java.lang.Object other)
boolean
equals(java.lang.Object o)
OkHttpProperties.CacheProperties
getCache()
OkHttpProperties.ConnectionPoolProperties
getConnectionPool()
java.time.Duration
getConnectTimeout()
The default connect timeout for new connections.java.time.Duration
getPingInterval()
The interval between web socket pings initiated by this client.java.time.Duration
getReadTimeout()
The default read timeout for new connections.java.time.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(java.time.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(java.time.Duration pingInterval)
The interval between web socket pings initiated by this client.void
setReadTimeout(java.time.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(java.time.Duration writeTimeout)
The default write timeout for new connections.java.lang.String
toString()
-
-
-
Method Detail
-
getConnectTimeout
public java.time.Duration getConnectTimeout()
The default connect timeout for new connections.
-
getReadTimeout
public java.time.Duration getReadTimeout()
The default read timeout for new connections.
-
getWriteTimeout
public java.time.Duration getWriteTimeout()
The default write timeout for new connections.
-
getPingInterval
public java.time.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.CacheProperties 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(java.time.Duration connectTimeout)
The default connect timeout for new connections.
-
setReadTimeout
public void setReadTimeout(java.time.Duration readTimeout)
The default read timeout for new connections.
-
setWriteTimeout
public void setWriteTimeout(java.time.Duration writeTimeout)
The default write timeout for new connections.
-
setPingInterval
public void setPingInterval(java.time.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.CacheProperties 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.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-