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
FieldsModifier and TypeFieldDescriptionstatic intDefault connection timeout in millisecondsstatic intDefault read timeout in millisecondsFields inherited from interface org.kohsuke.github.HttpConnector
DEFAULT, OFFLINE -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates 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: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
-