public abstract class AbstractApacheClientHttpInvoker extends Object implements HttpInvoker
HttpInvoker that uses The Apache HTTP client.| Modifier and Type | Field and Description |
|---|---|
protected static int |
BUFFER_SIZE |
protected static String |
HTTP_CLIENT |
protected static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
AbstractApacheClientHttpInvoker() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeSocket(Socket socket)
Closes the given socket and ignores exceptions.
|
protected org.apache.http.params.HttpParams |
createDefaultHttpParams(BindingSession session)
Creates default params for the Apache HTTP Client.
|
protected abstract org.apache.http.impl.client.DefaultHttpClient |
createHttpClient(UrlBuilder url,
BindingSession session)
Creates the
HttpClient instance. |
protected Response |
invoke(UrlBuilder url,
String method,
String contentType,
Map<String,String> headers,
Output writer,
BindingSession session,
BigInteger offset,
BigInteger length) |
Response |
invokeDELETE(UrlBuilder url,
BindingSession session)
Executes a HTTP DELETE request.
|
Response |
invokeGET(UrlBuilder url,
BindingSession session)
Executes a HTTP GET request.
|
Response |
invokeGET(UrlBuilder url,
BindingSession session,
BigInteger offset,
BigInteger length)
Executes a HTTP GET request.
|
Response |
invokePOST(UrlBuilder url,
String contentType,
Output writer,
BindingSession session)
Executes a HTTP POST request.
|
Response |
invokePUT(UrlBuilder url,
String contentType,
Map<String,String> headers,
Output writer,
BindingSession session)
Executes a HTTP PUT request.
|
protected void |
verify(HostnameVerifier verifier,
String host,
SSLSocket sslSocket)
Verifies a hostname with the given verifier.
|
protected static final org.slf4j.Logger LOG
protected static final String HTTP_CLIENT
protected static final int BUFFER_SIZE
public Response invokeGET(UrlBuilder url, BindingSession session)
HttpInvokerinvokeGET in interface HttpInvokerpublic Response invokeGET(UrlBuilder url, BindingSession session, BigInteger offset, BigInteger length)
HttpInvokerinvokeGET in interface HttpInvokerpublic Response invokePOST(UrlBuilder url, String contentType, Output writer, BindingSession session)
HttpInvokerinvokePOST in interface HttpInvokerpublic Response invokePUT(UrlBuilder url, String contentType, Map<String,String> headers, Output writer, BindingSession session)
HttpInvokerinvokePUT in interface HttpInvokerpublic Response invokeDELETE(UrlBuilder url, BindingSession session)
HttpInvokerinvokeDELETE in interface HttpInvokerprotected Response invoke(UrlBuilder url, String method, String contentType, Map<String,String> headers, Output writer, BindingSession session, BigInteger offset, BigInteger length)
protected org.apache.http.params.HttpParams createDefaultHttpParams(BindingSession session)
protected void verify(HostnameVerifier verifier, String host, SSLSocket sslSocket) throws IOException
IOExceptionprotected void closeSocket(Socket socket)
protected abstract org.apache.http.impl.client.DefaultHttpClient createHttpClient(UrlBuilder url, BindingSession session)
HttpClient instance.Copyright © 2009-2015 The Apache Software Foundation. All Rights Reserved.