Package org.kohsuke.github.extras
Class ImpatientHttpConnector
java.lang.Object
org.kohsuke.github.extras.ImpatientHttpConnector
- All Implemented Interfaces:
HttpConnector
HttpConnector
wrapper that sets timeout- Author:
- Kohsuke Kawaguchi
-
Field Summary
Modifier and TypeFieldDescriptionstatic int
Default connection timeout in millisecondsstatic int
Default read timeout in millisecondsFields inherited from interface org.kohsuke.github.HttpConnector
DEFAULT, OFFLINE
-
Constructor Summary
ConstructorDescriptionInstantiates 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
Modifier and TypeMethodDescriptionOpens a connection to the given URL.
-
Field Details
-
CONNECT_TIMEOUT
public static int CONNECT_TIMEOUTDefault connection timeout in milliseconds -
READ_TIMEOUT
public static int READ_TIMEOUTDefault read timeout in milliseconds
-
-
Constructor Details
-
ImpatientHttpConnector
Instantiates a new Impatient http connector.- Parameters:
base
- the baseconnectTimeout
- HTTP connection timeout in millisecondsreadTimeout
- HTTP read timeout in milliseconds
-
ImpatientHttpConnector
Instantiates a new Impatient http connector.- Parameters:
base
- the basetimeout
- the timeout
-
ImpatientHttpConnector
Instantiates a new Impatient http connector.- Parameters:
base
- the base
-
-
Method Details
-
connect
Description copied from interface:HttpConnector
Opens a connection to the given URL.- Specified by:
connect
in interfaceHttpConnector
- Parameters:
url
- the url- Returns:
- the http url connection
- Throws:
IOException
- the io exception
-