public abstract class AbstractOperation<T> extends Object
| 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 String |
XML_PREAMBLE |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractOperation(URI repository) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
check(org.apache.http.HttpResponse response,
URI requestUri) |
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 |
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 String XML_PREAMBLE
protected final URI repository
protected AbstractOperation(URI repository)
protected void check(org.apache.http.HttpResponse response,
URI requestUri)
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 serverclient - HttpClient to use for this AbstractOperationcontext - HttpContext to use for this AbstractOperationVoid if non is expectedprotected abstract boolean isExpectedStatusCode(int statusCode)
protected abstract T processResponse(org.apache.http.HttpResponse response)
Copyright © 2013–2014 shadowhunt. All rights reserved.