public class PostTask
extends org.apache.tools.ant.Task
| Modifier and Type | Class and Description |
|---|---|
class |
PostTask.Cookie
Represents a cookie.
|
| Constructor and Description |
|---|
PostTask() |
| Modifier and Type | Method and Description |
|---|---|
void |
addConfiguredProp(Prop p)
Adds a name/value pair to post.
|
void |
addText(java.lang.String text)
Adds a feature to the Text attribute of the PostTask object
|
void |
execute()
Do the post.
|
void |
setAppend(boolean b)
Should the log file be appended to or overwritten? Default is true,
append to the file.
|
void |
setEncoding(java.lang.String encoding)
Sets the encoding of the outgoing properties, default is UTF-8.
|
void |
setFailonerror(boolean fail)
Should the build fail if the post fails?
|
void |
setFile(java.io.File f)
Set the name of a file to read a set of properties from.
|
void |
setLogfile(java.io.File f)
Set the name of a file to save the response to.
|
void |
setMaxwait(int wait)
How long to wait on the remote server.
|
void |
setProperty(java.lang.String name)
Set the name of a property to save the response to.
|
void |
setTo(java.net.URL name)
Set the url to post to.
|
void |
setVerbose(boolean b)
If true, progress messages and returned data from the post will be
displayed.
|
void |
setWantresponse(boolean b)
Default is true, get the response from the post.
|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypepublic void setTo(java.net.URL name)
name - the url to post to.public void setFile(java.io.File f)
f - the filepublic void setLogfile(java.io.File f)
f - the filepublic void setAppend(boolean b)
b - append or notpublic void setVerbose(boolean b)
b - true = verbosepublic void setWantresponse(boolean b)
b - print/log server responsepublic void setProperty(java.lang.String name)
name - the name to use for the propertypublic void setEncoding(java.lang.String encoding)
encoding - The new encoding valuepublic void setMaxwait(int wait)
The default wait period is 3 minutes (180 seconds).
wait - time to wait in seconds, set to 0 to wait forever.public void setFailonerror(boolean fail)
fail - true = fail the build, default is falsepublic void addConfiguredProp(Prop p) throws org.apache.tools.ant.BuildException
p - A property pair to send as part of the post.org.apache.tools.ant.BuildException - When name and/or value are missing.public void addText(java.lang.String text)
text - The feature to be added to the Text attributepublic void execute()
throws org.apache.tools.ant.BuildException
execute in class org.apache.tools.ant.Taskorg.apache.tools.ant.BuildException - On any error.