public class HttpConnector extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
HTTPHEADER_IETF_DRAFT_RATELIMIT_LIMIT |
static String |
HTTPHEADER_IETF_DRAFT_RATELIMIT_REMAINING |
static String |
HTTPHEADER_IETF_DRAFT_RATELIMIT_RESET |
| Constructor and Description |
|---|
HttpConnector() |
| Modifier and Type | Method and Description |
|---|---|
int |
getDefaultDelay() |
String |
getInputSource(String requestUrl)
Given the URL returns the content via HTTP GET
|
InputStream |
getInputSourceAsStream(String requestUrl)
Given the URL returns the content as a stream via HTTP GET
|
int |
getMaxNumberOfRetry() |
int |
getReadTimeOut() |
String |
getResponseType() |
void |
initTrustManager()
register for https scheme; this is a workaround and not intended for the use in trusted environments
|
void |
setDefaultDelay(int defaultDelay) |
void |
setMaxNumberOfRetry(int maxNumberOfRetry) |
void |
setReadTimeOut(int readTimeOut) |
public static final String HTTPHEADER_IETF_DRAFT_RATELIMIT_LIMIT
public static final String HTTPHEADER_IETF_DRAFT_RATELIMIT_REMAINING
public static final String HTTPHEADER_IETF_DRAFT_RATELIMIT_RESET
public String getInputSource(String requestUrl) throws eu.dnetlib.data.collector.rmi.CollectorServiceException
requestUrl - the URLeu.dnetlib.data.collector.rmi.CollectorServiceException - when retrying more than maxNumberOfRetry timespublic InputStream getInputSourceAsStream(String requestUrl) throws eu.dnetlib.data.collector.rmi.CollectorServiceException
requestUrl - the URLeu.dnetlib.data.collector.rmi.CollectorServiceException - when retrying more than maxNumberOfRetry timespublic void initTrustManager()
public int getMaxNumberOfRetry()
public void setMaxNumberOfRetry(int maxNumberOfRetry)
public int getDefaultDelay()
public void setDefaultDelay(int defaultDelay)
public int getReadTimeOut()
public void setReadTimeOut(int readTimeOut)
public String getResponseType()
Copyright © 2022. All rights reserved.