public abstract class AbstractOperation<T> extends Object implements org.apache.http.client.ResponseHandler<T>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractOperation.DavTemplateRequest |
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.http.entity.ContentType |
CONTENT_TYPE_XML |
protected URI |
repository |
protected static XMLOutputFactory |
XML_OUTPUT_FACTORY |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractOperation(URI repository) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
check(org.apache.http.HttpResponse response) |
protected abstract org.apache.http.client.methods.HttpUriRequest |
createRequest() |
T |
execute(org.apache.http.client.HttpClient client,
org.apache.http.protocol.HttpContext context)
Run the
AbstractOperation against the server. |
T |
handleResponse(org.apache.http.HttpResponse response) |
protected abstract boolean |
isExpectedStatusCode(int statusCode) |
protected abstract T |
processResponse(org.apache.http.HttpResponse response) |
protected static final org.apache.http.entity.ContentType CONTENT_TYPE_XML
protected static final XMLOutputFactory XML_OUTPUT_FACTORY
protected final URI repository
protected AbstractOperation(URI repository)
protected void check(org.apache.http.HttpResponse response)
protected abstract org.apache.http.client.methods.HttpUriRequest createRequest()
public T execute(org.apache.http.client.HttpClient client, org.apache.http.protocol.HttpContext context)
AbstractOperation against the server.client - HttpClient to use for this AbstractOperationcontext - HttpContext to use for this AbstractOperationVoid if non is expectedpublic T handleResponse(org.apache.http.HttpResponse response) throws IOException
handleResponse in interface org.apache.http.client.ResponseHandler<T>IOExceptionprotected abstract boolean isExpectedStatusCode(int statusCode)
protected abstract T processResponse(org.apache.http.HttpResponse response) throws IOException
IOExceptionCopyright © 2013–2017 shadowhunt. All rights reserved.