Class OkHttpProperties

java.lang.Object
io.freefair.spring.okhttp.autoconfigure.OkHttpProperties

@ConfigurationProperties(prefix="okhttp") public class OkHttpProperties extends Object
  • Constructor Details

  • Method Details

    • getConnectTimeout

      The default connect timeout for new connections.
    • getReadTimeout

      The default read timeout for new connections.
    • getWriteTimeout

      The default write timeout for new connections.
    • 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

    • 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

    • 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

    • 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(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object