Class JDKHttpClientConfig
- java.lang.Object
-
- com.github.scribejava.core.httpclient.jdk.JDKHttpClientConfig
-
- All Implemented Interfaces:
HttpClientConfig
public class JDKHttpClientConfig extends java.lang.Object implements HttpClientConfig
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.IntegerconnectTimeoutprivate booleanfollowRedirectsprivate java.net.Proxyproxyprivate java.lang.IntegerreadTimeout
-
Constructor Summary
Constructors Constructor Description JDKHttpClientConfig()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JDKHttpClientConfigcreateDefaultConfig()static JDKHttpClientConfigdefaultConfig()java.lang.IntegergetConnectTimeout()java.net.ProxygetProxy()java.lang.IntegergetReadTimeout()booleanisFollowRedirects()voidsetConnectTimeout(java.lang.Integer connectTimeout)voidsetFollowRedirects(boolean followRedirects)Sets whether the underlying Http Connection follows redirects or not.voidsetProxy(java.net.Proxy proxy)voidsetReadTimeout(java.lang.Integer readTimeout)JDKHttpClientConfigwithConnectTimeout(java.lang.Integer connectTimeout)JDKHttpClientConfigwithFollowRedirects(boolean followRedirects)Sets whether the underlying Http Connection follows redirects or not.JDKHttpClientConfigwithProxy(java.net.Proxy proxy)JDKHttpClientConfigwithReadTimeout(java.lang.Integer readTimeout)
-
-
-
Method Detail
-
createDefaultConfig
public JDKHttpClientConfig createDefaultConfig()
- Specified by:
createDefaultConfigin interfaceHttpClientConfig
-
defaultConfig
public static JDKHttpClientConfig defaultConfig()
-
getConnectTimeout
public java.lang.Integer getConnectTimeout()
-
setConnectTimeout
public void setConnectTimeout(java.lang.Integer connectTimeout)
-
withConnectTimeout
public JDKHttpClientConfig withConnectTimeout(java.lang.Integer connectTimeout)
-
getReadTimeout
public java.lang.Integer getReadTimeout()
-
setReadTimeout
public void setReadTimeout(java.lang.Integer readTimeout)
-
withReadTimeout
public JDKHttpClientConfig withReadTimeout(java.lang.Integer readTimeout)
-
setProxy
public void setProxy(java.net.Proxy proxy)
-
getProxy
public java.net.Proxy getProxy()
-
withProxy
public JDKHttpClientConfig withProxy(java.net.Proxy proxy)
-
isFollowRedirects
public boolean isFollowRedirects()
-
setFollowRedirects
public void setFollowRedirects(boolean followRedirects)
Sets whether the underlying Http Connection follows redirects or not. Defaults to true (follow redirects)- Parameters:
followRedirects- boolean- See Also:
- http://docs.oracle.com/javase/6/docs/api/java/net/HttpURLConnection.html#setInstanceFollowRedirects(boolean)
-
withFollowRedirects
public JDKHttpClientConfig withFollowRedirects(boolean followRedirects)
Sets whether the underlying Http Connection follows redirects or not. Defaults to true (follow redirects)- Parameters:
followRedirects- boolean- Returns:
- this for chaining methods invocations
- See Also:
- http://docs.oracle.com/javase/6/docs/api/java/net/HttpURLConnection.html#setInstanceFollowRedirects(boolean)
-
-