Package org.opencastproject.security.api
Interface TrustedHttpClient
public interface TrustedHttpClient
Provides secured http client components to access to protected resources.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose(org.apache.http.HttpResponse response) Closes this response.org.apache.http.HttpResponseexecute(org.apache.http.client.methods.HttpUriRequest httpUriRequest) Executes an HttpRequest using a secure, but not necessarily encrypted, http connection.org.apache.http.HttpResponseexecute(org.apache.http.client.methods.HttpUriRequest httpUriRequest, int connectionTimeout, int socketTimeout) Executes an HttpRequest using a secure, but not necessarily encrypted, http connection, waiting for the specified timeouts.
-
Method Details
-
execute
org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpUriRequest httpUriRequest) throws TrustedHttpClientException Executes an HttpRequest using a secure, but not necessarily encrypted, http connection.- Parameters:
httpUriRequest- The http request- Returns:
- the http response returned by the server
- Throws:
TrustedHttpClientException
-
execute
org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpUriRequest httpUriRequest, int connectionTimeout, int socketTimeout) throws TrustedHttpClientException Executes an HttpRequest using a secure, but not necessarily encrypted, http connection, waiting for the specified timeouts.- Parameters:
httpUriRequest- The http requestconnectionTimeout- the wait time in milliseconds at which a connection attempt will throwsocketTimeout- the maximum time in milliseconds allowed between packets before this method will throw- Returns:
- the http response returned by the server
- Throws:
TrustedHttpClientException
-
close
Closes this response. The caller must call close() once finished reading the response.- Parameters:
response- The response to close- Throws:
IOException
-