Package org.apache.camel.catalog.maven
Class TimeoutHttpClientHandler
- java.lang.Object
-
- org.apache.ivy.util.url.AbstractURLHandler
-
- org.apache.ivy.util.url.HttpClientHandler
-
- org.apache.camel.catalog.maven.TimeoutHttpClientHandler
-
- All Implemented Interfaces:
AutoCloseable,org.apache.ivy.util.url.TimeoutConstrainedURLHandler,org.apache.ivy.util.url.URLHandler
public class TimeoutHttpClientHandler extends org.apache.ivy.util.url.HttpClientHandlerAHttpClientHandlerwhich uses HttpClient for downloading via http/https and have support for connection timeouts which otherwise is not supported by default in Apache Ivy.
-
-
Constructor Summary
Constructors Constructor Description TimeoutHttpClientHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetTimeout()org.apache.ivy.util.url.URLHandler.URLInfogetURLInfo(URL url)InputStreamopenStream(URL url)voidsetTimeout(int timeout)Sets the timeout in millis (http.socket.timeout) when downloading via http/https protocols.-
Methods inherited from class org.apache.ivy.util.url.HttpClientHandler
close, download, download, getContentLength, getLastModified, getURLInfo, getURLInfo, isReachable, openStream, upload, upload
-
Methods inherited from class org.apache.ivy.util.url.AbstractURLHandler
createTimeoutConstraints, getContentLength, getContentLength, getDecodingInputStream, getLastModified, getLastModified, getRequestMethod, getUserAgent, isReachable, isReachable, normalizeToString, normalizeToURL, setRequestMethod, validatePutStatusCode
-
-
-
-
Method Detail
-
getTimeout
public int getTimeout()
-
setTimeout
public void setTimeout(int timeout)
Sets the timeout in millis (http.socket.timeout) when downloading via http/https protocols. The default value is 10000
-
getURLInfo
public org.apache.ivy.util.url.URLHandler.URLInfo getURLInfo(URL url)
- Specified by:
getURLInfoin interfaceorg.apache.ivy.util.url.URLHandler- Overrides:
getURLInfoin classorg.apache.ivy.util.url.HttpClientHandler
-
openStream
public InputStream openStream(URL url) throws IOException
- Specified by:
openStreamin interfaceorg.apache.ivy.util.url.URLHandler- Overrides:
openStreamin classorg.apache.ivy.util.url.HttpClientHandler- Throws:
IOException
-
-