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
trydofor
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringKeypublic inttimeoutConnpublic final static StringKey$timeoutConnpublic inttimeoutReadpublic final static StringKey$timeoutReadpublic inttimeoutWritepublic final static StringKey$timeoutWritepublic intpingIntervalpublic final static StringKey$pingIntervalpublic intcacheMegabytepublic final static StringKey$cacheMegabytepublic FilecacheDirectorypublic final static StringKey$cacheDirectorypublic final static StringKey$followRedirectSslpublic final static StringKey$followRedirectpublic final static StringKey$retryFailurepublic intmaxIdlepublic final static StringKey$maxIdlepublic intkeepAlivepublic final static StringKey$keepAlivepublic final static StringKey$sslTrustAllpublic final static StringKey$hostCookiepublic final static StringKey$redirectNop
-
Constructor Summary
Constructors Constructor Description SlardarOkhttpProp()
-
Method Summary
Modifier and Type Method Description intgetTimeoutConn()connect timeout in seconds. voidsetTimeoutConn(int timeoutConn)connect timeout in seconds. intgetTimeoutRead()read timeout in seconds. voidsetTimeoutRead(int timeoutRead)read timeout in seconds. intgetTimeoutWrite()write timeout in seconds. voidsetTimeoutWrite(int timeoutWrite)write timeout in seconds. intgetPingInterval()ping interval in seconds, `0` means disable voidsetPingInterval(int pingInterval)ping interval in seconds, `0` means disable intgetCacheMegabyte()cache size in `Mb`, `0` means disable voidsetCacheMegabyte(int cacheMegabyte)cache size in `Mb`, `0` means disable FilegetCacheDirectory()Cache directory, created under temp by default, `wings-okhttp-cache` voidsetCacheDirectory(File cacheDirectory)Cache directory, created under temp by default, `wings-okhttp-cache` intgetMaxIdle()max count of idle connection. voidsetMaxIdle(int maxIdle)max count of idle connection. intgetKeepAlive()keep-alive in seconds. voidsetKeepAlive(int keepAlive)keep-alive in seconds. booleanisFollowRedirectSsl()whether to follow the https redirect. booleanisFollowRedirect()whether to follow the http redirect. booleanisRetryFailure()whether to retry if connect failed. booleanisSslTrustAll()whether to trust all ssl certs. booleanisHostCookie()whether to keep cookies by host. booleanisRedirectNop()whether to temporarily do nothing when follow-redirect. booleanequals(@Nullable() Object o)inthashCode()StringtoString()voidsetFollowRedirectSsl(boolean followRedirectSsl)whether to follow the https redirect. voidsetFollowRedirect(boolean followRedirect)whether to follow the http redirect. voidsetRetryFailure(boolean retryFailure)whether to retry if connect failed. voidsetSslTrustAll(boolean sslTrustAll)whether to trust all ssl certs. voidsetHostCookie(boolean hostCookie)whether to keep cookies by host. voidsetRedirectNop(boolean redirectNop)whether to temporarily do nothing when follow-redirect. -
-
Method Detail
-
getTimeoutConn
int getTimeoutConn()
connect timeout in seconds.
-
setTimeoutConn
void setTimeoutConn(int timeoutConn)
connect timeout in seconds.
-
getTimeoutRead
int getTimeoutRead()
read timeout in seconds.
-
setTimeoutRead
void setTimeoutRead(int timeoutRead)
read timeout in seconds.
-
getTimeoutWrite
int getTimeoutWrite()
write 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
-
getCacheMegabyte
int getCacheMegabyte()
cache size in `Mb`, `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.
-
getKeepAlive
int getKeepAlive()
keep-alive in seconds.
-
setKeepAlive
void setKeepAlive(int keepAlive)
keep-alive in seconds.
-
isFollowRedirectSsl
boolean isFollowRedirectSsl()
whether to follow the https redirect.
-
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.
-
hashCode
int hashCode()
-
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.
-
-
-
-