Package org.apache.catalina.ant
Class AbstractCatalinaTask
- java.lang.Object
- 
- org.apache.tools.ant.ProjectComponent
- 
- org.apache.tools.ant.Task
- 
- org.apache.catalina.ant.BaseRedirectorHelperTask
- 
- org.apache.catalina.ant.AbstractCatalinaTask
 
 
 
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable
 - Direct Known Subclasses:
- AbstractCatalinaCommandTask,- FindLeaksTask,- JKStatusUpdateTask,- JMXGetTask,- JMXQueryTask,- JMXSetTask,- ListTask,- ResourcesTask,- ServerinfoTask,- SslConnectorCiphersTask,- ThreaddumpTask,- VminfoTask
 
 public abstract class AbstractCatalinaTask extends BaseRedirectorHelperTask Abstract base class for Ant tasks that interact with the Manager web application for dynamically deploying and undeploying applications. These tasks require Ant 1.4 or later.- Since:
- 4.1
- Author:
- Craig R. McClanahan
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.lang.StringcharsetThe charset used during URL encoding.protected booleanignoreResponseConstraintIf set to true - ignore the constraint of the first line of the response message that must be "OK -".protected java.lang.StringpasswordThe login password for theManagerapplication.protected java.lang.StringurlThe URL of theManagerapplication to be used.protected java.lang.StringusernameThe login username for theManagerapplication.- 
Fields inherited from class org.apache.catalina.ant.BaseRedirectorHelperTaskalwaysLog, failOnError, redirectErrStream, redirector, redirectorConfigured, redirectorElement, redirectOutput, redirectOutStream
 
- 
 - 
Constructor SummaryConstructors Constructor Description AbstractCatalinaTask()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()Execute the specified command.voidexecute(java.lang.String command)Execute the specified command, based on the configured properties.voidexecute(java.lang.String command, java.io.InputStream istream, java.lang.String contentType, long contentLength)Execute the specified command, based on the configured properties.java.lang.StringgetCharset()java.lang.StringgetPassword()java.lang.StringgetUrl()java.lang.StringgetUsername()booleanisIgnoreResponseConstraint()voidsetCharset(java.lang.String charset)voidsetIgnoreResponseConstraint(boolean ignoreResponseConstraint)voidsetPassword(java.lang.String password)voidsetUrl(java.lang.String url)voidsetUsername(java.lang.String username)- 
Methods inherited from class org.apache.catalina.ant.BaseRedirectorHelperTaskaddConfiguredRedirector, closeRedirector, handleErrorFlush, handleErrorOutput, handleFlush, handleOutput, handleOutput, isFailOnError, openRedirector, setAlwaysLog, setAppend, setCreateEmptyFiles, setError, setErrorProperty, setFailonerror, setLogError, setOutput, setOutputproperty
 - 
Methods inherited from class org.apache.tools.ant.TaskbindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleInput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
- 
 
- 
- 
- 
Field Detail- 
charsetprotected java.lang.String charset The charset used during URL encoding.
 - 
passwordprotected java.lang.String password The login password for theManagerapplication.
 - 
urlprotected java.lang.String url The URL of theManagerapplication to be used.
 - 
usernameprotected java.lang.String username The login username for theManagerapplication.
 - 
ignoreResponseConstraintprotected boolean ignoreResponseConstraint If set to true - ignore the constraint of the first line of the response message that must be "OK -".When this attribute is set to false(the default), the first line of server response is expected to start with "OK -". If it does not then the task is considered as failed and the first line is treated as an error message.When this attribute is set to true, the first line of the response is treated like any other, regardless of its text.
 
- 
 - 
Method Detail- 
getCharsetpublic java.lang.String getCharset() 
 - 
setCharsetpublic void setCharset(java.lang.String charset) 
 - 
getPasswordpublic java.lang.String getPassword() 
 - 
setPasswordpublic void setPassword(java.lang.String password) 
 - 
getUrlpublic java.lang.String getUrl() 
 - 
setUrlpublic void setUrl(java.lang.String url) 
 - 
getUsernamepublic java.lang.String getUsername() 
 - 
setUsernamepublic void setUsername(java.lang.String username) 
 - 
isIgnoreResponseConstraintpublic boolean isIgnoreResponseConstraint() 
 - 
setIgnoreResponseConstraintpublic void setIgnoreResponseConstraint(boolean ignoreResponseConstraint) 
 - 
executepublic void execute() throws org.apache.tools.ant.BuildExceptionExecute the specified command. This logic only performs the common attribute validation required by all subclasses; it does not perform any functional logic directly.- Overrides:
- executein class- org.apache.tools.ant.Task
- Throws:
- org.apache.tools.ant.BuildException- if a validation error occurs
 
 - 
executepublic void execute(java.lang.String command) throws org.apache.tools.ant.BuildExceptionExecute the specified command, based on the configured properties.- Parameters:
- command- Command to be executed
- Throws:
- org.apache.tools.ant.BuildException- if an error occurs
 
 - 
executepublic void execute(java.lang.String command, java.io.InputStream istream, java.lang.String contentType, long contentLength) throws org.apache.tools.ant.BuildExceptionExecute the specified command, based on the configured properties. The input stream will be closed upon completion of this task, whether it was executed successfully or not.- Parameters:
- command- Command to be executed
- istream- InputStream to include in an HTTP PUT, if any
- contentType- Content type to specify for the input, if any
- contentLength- Content length to specify for the input, if any
- Throws:
- org.apache.tools.ant.BuildException- if an error occurs
 
 
- 
 
-