Package org.kohsuke.github.extras
Class ImpatientHttpConnector
- java.lang.Object
-
- org.kohsuke.github.extras.ImpatientHttpConnector
-
- All Implemented Interfaces:
HttpConnector
public class ImpatientHttpConnector extends Object implements HttpConnector
HttpConnectorwrapper that sets timeout- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description static intCONNECT_TIMEOUTDefault connection timeout in millisecondsstatic intREAD_TIMEOUTDefault read timeout in milliseconds-
Fields inherited from interface org.kohsuke.github.HttpConnector
DEFAULT, OFFLINE
-
-
Constructor Summary
Constructors Constructor Description ImpatientHttpConnector(HttpConnector base)Instantiates a new Impatient http connector.ImpatientHttpConnector(HttpConnector base, int timeout)Instantiates a new Impatient http connector.ImpatientHttpConnector(HttpConnector base, int connectTimeout, int readTimeout)Instantiates a new Impatient http connector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpURLConnectionconnect(URL url)Opens a connection to the given URL.
-
-
-
Constructor Detail
-
ImpatientHttpConnector
public ImpatientHttpConnector(HttpConnector base, int connectTimeout, int readTimeout)
Instantiates a new Impatient http connector.- Parameters:
base- the baseconnectTimeout- HTTP connection timeout in millisecondsreadTimeout- HTTP read timeout in milliseconds
-
ImpatientHttpConnector
public ImpatientHttpConnector(HttpConnector base, int timeout)
Instantiates a new Impatient http connector.- Parameters:
base- the basetimeout- the timeout
-
ImpatientHttpConnector
public ImpatientHttpConnector(HttpConnector base)
Instantiates a new Impatient http connector.- Parameters:
base- the base
-
-
Method Detail
-
connect
public HttpURLConnection connect(URL url) throws IOException
Description copied from interface:HttpConnectorOpens a connection to the given URL.- Specified by:
connectin interfaceHttpConnector- Parameters:
url- the url- Returns:
- the http url connection
- Throws:
IOException- the io exception
-
-