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)
HttpInvoker
invokeGET
in interface HttpInvoker
public Response invokeGET(UrlBuilder url, BindingSession session, BigInteger offset, BigInteger length)
HttpInvoker
invokeGET
in interface HttpInvoker
public Response invokePOST(UrlBuilder url, String contentType, Output writer, BindingSession session)
HttpInvoker
invokePOST
in interface HttpInvoker
public Response invokePUT(UrlBuilder url, String contentType, Map<String,String> headers, Output writer, BindingSession session)
HttpInvoker
invokePUT
in interface HttpInvoker
public Response invokeDELETE(UrlBuilder url, BindingSession session)
HttpInvoker
invokeDELETE
in interface HttpInvoker
protected 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
IOException
protected void closeSocket(Socket socket)
protected abstract org.apache.http.impl.client.DefaultHttpClient createHttpClient(UrlBuilder url, BindingSession session)
HttpClient
instance.Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.