public abstract class HTTPTask extends Task implements AnnotatedAntTask, ClasspathDelegateAntTask, ConfigurableAntTask, HttpRequestInterceptor, HttpResponseInterceptor
Task for web
API client tasks.
<HTTPTask buffer="boolean" classname="String" classpathref="Reference" description="String" taskname="String">
<classpath .../>
</HTTPTask>
| Modifier and Type | Class and Description |
|---|---|
static class |
HTTPTask.Delete
|
static class |
HTTPTask.Get
|
static class |
HTTPTask.Head
|
static class |
HTTPTask.NameValuePairImpl
StringAttributeType implementation that includes
NameValuePair. |
static class |
HTTPTask.Options
|
static class |
HTTPTask.Patch
|
static class |
HTTPTask.Post
|
static class |
HTTPTask.Put
|
protected static class |
HTTPTask.Request
|
description, location, project| Constructor and Description |
|---|
HTTPTask() |
| Modifier and Type | Method and Description |
|---|---|
protected HttpClientBuilder |
builder()
Method to allow subclasses to configure the
HttpClientBuilder. |
void |
execute()
Default implementation for
Task subclasses. |
void |
init()
Default implementation for
Task
subclasses. |
protected void |
log(HttpContext context)
See
Task.log(String). |
protected void |
log(HttpMessage message)
See
Task.log(String). |
protected void |
log(String type,
HttpEntity entity)
See
Task.log(String). |
void |
process(HttpRequest request,
HttpContext context) |
void |
process(HttpResponse response,
HttpContext context) |
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeclone, getDescription, getLocation, getProject, setDescription, setLocation, setProjectequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAntTaskNamelog, log, log, log, log, log, log, log, log, log, logcreateClasspath, delegate, delegate, getClassForName, getClassLoader, setClassname, setClasspathrefconfigurepublic HTTPTask()
public void init() throws BuildException
ClasspathDelegateAntTaskTask
subclasses.init in interface ClasspathDelegateAntTaskinit in interface ConfigurableAntTaskinit in class TaskBuildExceptionpublic void execute() throws BuildException
AnnotatedAntTaskTask subclasses. Check attributes
annotated with AntTaskAttributeConstraint.
See AnnotatedAntTaskConfigurationChecker.execute in interface AnnotatedAntTaskexecute in class TaskBuildException - If a
AntTaskAttributeConstraint.Checker
fails.protected HttpClientBuilder builder()
HttpClientBuilder.HttpClientBuilder.public void process(HttpRequest request, HttpContext context) throws IOException
process in interface HttpRequestInterceptorIOExceptionpublic void process(HttpResponse response, HttpContext context) throws IOException
process in interface HttpResponseInterceptorIOExceptionprotected void log(HttpContext context)
Task.log(String).context - The HttpContext to log.protected void log(HttpMessage message)
Task.log(String).message - The HttpMessage to log.protected void log(String type, HttpEntity entity)
Task.log(String).type - The entity Content-Type (if
specified).entity - The HttpEntity to log.Copyright © 2015–2020 Allen D. Ball. All rights reserved.