Class SlardarOkhttpProp

  • All Implemented Interfaces:

    @ConfigurationProperties(value = SlardarOkhttpProp.Key) 
    public class SlardarOkhttpProp
    
                        

    okhttp as one word in string/config OkHttp as tow word in code naming

    Since:

    2021-02-14

    Author:

    trydofor

    • Constructor Detail

      • SlardarOkhttpProp

        SlardarOkhttpProp()
    • Method Detail

      • setTimeoutConn

         void setTimeoutConn(int timeoutConn)

        connect timeout in seconds.

      • setTimeoutRead

         void setTimeoutRead(int timeoutRead)

        read timeout in seconds.

      • setTimeoutWrite

         void setTimeoutWrite(int timeoutWrite)

        write timeout in seconds.

      • getPingInterval

         int getPingInterval()

        ping interval in seconds, `0` means disable

      • setPingInterval

         void setPingInterval(int pingInterval)

        ping interval in seconds, `0` means disable

      • setCacheMegabyte

         void setCacheMegabyte(int cacheMegabyte)

        cache size in `Mb`, `0` means disable

      • getCacheDirectory

         File getCacheDirectory()

        Cache directory, created under temp by default, `wings-okhttp-cache`

      • setCacheDirectory

         void setCacheDirectory(File cacheDirectory)

        Cache directory, created under temp by default, `wings-okhttp-cache`

      • getMaxIdle

         int getMaxIdle()

        max count of idle connection.

      • setMaxIdle

         void setMaxIdle(int maxIdle)

        max count of idle connection.

      • setKeepAlive

         void setKeepAlive(int keepAlive)

        keep-alive in seconds.

      • isFollowRedirect

         boolean isFollowRedirect()

        whether to follow the http redirect.

      • isRetryFailure

         boolean isRetryFailure()

        whether to retry if connect failed.

      • isSslTrustAll

         boolean isSslTrustAll()

        whether to trust all ssl certs.

      • isHostCookie

         boolean isHostCookie()

        whether to keep cookies by host.

      • isRedirectNop

         boolean isRedirectNop()

        whether to temporarily do nothing when follow-redirect.

      • setFollowRedirectSsl

         void setFollowRedirectSsl(boolean followRedirectSsl)

        whether to follow the https redirect.

      • setFollowRedirect

         void setFollowRedirect(boolean followRedirect)

        whether to follow the http redirect.

      • setRetryFailure

         void setRetryFailure(boolean retryFailure)

        whether to retry if connect failed.

      • setSslTrustAll

         void setSslTrustAll(boolean sslTrustAll)

        whether to trust all ssl certs.

      • setHostCookie

         void setHostCookie(boolean hostCookie)

        whether to keep cookies by host.

      • setRedirectNop

         void setRedirectNop(boolean redirectNop)

        whether to temporarily do nothing when follow-redirect.