public class ImpatientHttpConnector extends Object implements HttpConnector
HttpConnector wrapper that sets timeout| Modifier and Type | Field and Description |
|---|---|
static int |
CONNECT_TIMEOUT
Default connection timeout in milliseconds
|
static int |
READ_TIMEOUT
Default read timeout in milliseconds
|
DEFAULT, OFFLINE| Constructor and 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.
|
| Modifier and Type | Method and Description |
|---|---|
HttpURLConnection |
connect(URL url)
Opens a connection to the given URL.
|
public static int CONNECT_TIMEOUT
public static int READ_TIMEOUT
public ImpatientHttpConnector(HttpConnector base, int connectTimeout, int readTimeout)
base - the baseconnectTimeout - HTTP connection timeout in millisecondsreadTimeout - HTTP read timeout in millisecondspublic ImpatientHttpConnector(HttpConnector base, int timeout)
base - the basetimeout - the timeoutpublic ImpatientHttpConnector(HttpConnector base)
base - the basepublic HttpURLConnection connect(URL url) throws IOException
HttpConnectorconnect in interface HttpConnectorurl - the urlIOException - the io exceptionCopyright © 2020. All rights reserved.