Package nl.b3p.commons.services
Class HttpClientConfigured
- java.lang.Object
-
- nl.b3p.commons.services.HttpClientConfigured
-
public class HttpClientConfigured extends Object
bundle of objects needed to do httpclient call- Author:
- Chris
-
-
Constructor Summary
Constructors Constructor Description HttpClientConfigured(B3PCredentials credentials)HttpClientConfigured(B3PCredentials credentials, int timeout)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidclose(org.apache.http.HttpResponse response)org.apache.http.HttpResponseexecute(org.apache.http.client.methods.HttpUriRequest method)org.apache.http.client.protocol.HttpClientContextgetContext()org.apache.http.client.HttpClientgetHttpClient()static voidsetAllowSelfSignedCerts(boolean assc)voidsetContext(org.apache.http.client.protocol.HttpClientContext context)voidsetHttpClient(org.apache.http.client.HttpClient httpClient)static voidsetMaxResponseTime(int aMaxResponseTime)static voidsetPreemptive(boolean aPreemptive)
-
-
-
Constructor Detail
-
HttpClientConfigured
public HttpClientConfigured(B3PCredentials credentials)
-
HttpClientConfigured
public HttpClientConfigured(B3PCredentials credentials, int timeout)
-
-
Method Detail
-
execute
public org.apache.http.HttpResponse execute(org.apache.http.client.methods.HttpUriRequest method) throws IOException- Throws:
IOException
-
close
public void close()
-
close
public void close(org.apache.http.HttpResponse response)
-
getHttpClient
public org.apache.http.client.HttpClient getHttpClient()
- Returns:
- the httpClient
-
setHttpClient
public void setHttpClient(org.apache.http.client.HttpClient httpClient)
- Parameters:
httpClient- the httpClient to set
-
getContext
public org.apache.http.client.protocol.HttpClientContext getContext()
- Returns:
- the context
-
setContext
public void setContext(org.apache.http.client.protocol.HttpClientContext context)
- Parameters:
context- the context to set
-
setMaxResponseTime
public static void setMaxResponseTime(int aMaxResponseTime)
- Parameters:
aMaxResponseTime- the maxResponseTime to set
-
setAllowSelfSignedCerts
public static void setAllowSelfSignedCerts(boolean assc)
- Parameters:
allowSelfSignedCerts- the allowSelfSignedCerts to set
-
setPreemptive
public static void setPreemptive(boolean aPreemptive)
- Parameters:
aPreemptive- the preemptive to set
-
-