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.HttpClientHandler
AHttpClientHandler
which 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 int
getTimeout()
org.apache.ivy.util.url.URLHandler.URLInfo
getURLInfo(URL url)
InputStream
openStream(URL url)
void
setTimeout(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:
getURLInfo
in interfaceorg.apache.ivy.util.url.URLHandler
- Overrides:
getURLInfo
in classorg.apache.ivy.util.url.HttpClientHandler
-
openStream
public InputStream openStream(URL url) throws IOException
- Specified by:
openStream
in interfaceorg.apache.ivy.util.url.URLHandler
- Overrides:
openStream
in classorg.apache.ivy.util.url.HttpClientHandler
- Throws:
IOException
-
-