Package de.julielab.bioportal.ontologies
Class HttpHandler
- java.lang.Object
-
- de.julielab.bioportal.ontologies.HttpHandler
-
public class HttpHandler extends Object
-
-
Constructor Summary
Constructors Constructor Description HttpHandler(String apiKey)HttpHandler(String apiKey, int timeout, int maxRetries, int waittime)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringconvertEntityToUTF8String(org.apache.http.HttpEntity response)org.apache.http.HttpEntitysendGetRequest(String address)org.apache.http.HttpEntitysendGetRequest(URI uri)org.apache.http.HttpEntitysendGetRequest(org.apache.http.client.methods.HttpGet reusableGet)
-
-
-
Constructor Detail
-
HttpHandler
public HttpHandler(String apiKey)
-
HttpHandler
public HttpHandler(String apiKey, int timeout, int maxRetries, int waittime)
- Parameters:
apiKey- BioPortal API keytimeout- Connection timeout in millisecondsmaxRetries- Numbers of retries if a connection failswaittime- Time to wait between reconnect retries in milliseconds
-
-
Method Detail
-
sendGetRequest
public org.apache.http.HttpEntity sendGetRequest(org.apache.http.client.methods.HttpGet reusableGet) throws SocketException, SocketTimeoutException, ResourceNotFoundException, ResourceAccessDeniedException, ResourceDownloadException
-
sendGetRequest
public org.apache.http.HttpEntity sendGetRequest(String address) throws SocketTimeoutException, ResourceNotFoundException, ResourceAccessDeniedException, ResourceDownloadException
-
sendGetRequest
public org.apache.http.HttpEntity sendGetRequest(URI uri) throws ResourceNotFoundException, ResourceAccessDeniedException, ResourceDownloadException
-
convertEntityToUTF8String
public static String convertEntityToUTF8String(org.apache.http.HttpEntity response) throws IOException
- Throws:
IOException
-
-