public abstract class BaseRedirectorHelperTask
extends org.apache.tools.ant.Task
Modifier and Type | Field and Description |
---|---|
protected boolean |
alwaysLog
Flag which indicates that, if redirected, output should also be
always sent to the log.
|
protected boolean |
failOnError
Whether to fail (with a BuildException) if
ManagerServlet returns an error.
|
protected java.io.OutputStream |
redirectErrStream
The stream for error output
|
protected org.apache.tools.ant.taskdefs.Redirector |
redirector
Redirector helper
|
protected boolean |
redirectorConfigured
will be set to
true when the configuration of the Redirector is
complete. |
protected org.apache.tools.ant.types.RedirectorElement |
redirectorElement
Redirector element for this task
|
protected boolean |
redirectOutput
true true when output redirection is requested for this task . |
protected java.io.OutputStream |
redirectOutStream
The stream for info output
|
Constructor and Description |
---|
BaseRedirectorHelperTask() |
Modifier and Type | Method and Description |
---|---|
void |
addConfiguredRedirector(org.apache.tools.ant.types.RedirectorElement redirectorElement)
Add a
RedirectorElement to this task. |
protected void |
closeRedirector()
Ask redirector to close all the streams.
|
protected void |
handleErrorFlush(java.lang.String output)
Handles error output with the ERR priority and flushes the stream.
|
protected void |
handleErrorOutput(java.lang.String output)
Handles error output with the ERR priority.
|
protected void |
handleFlush(java.lang.String output)
Handles output with the INFO priority and flushes the stream.
|
protected void |
handleOutput(java.lang.String output)
Handles output with the INFO priority.
|
protected void |
handleOutput(java.lang.String output,
int priority)
Handles output with ERR priority to error stream and all other
priorities to output stream.
|
boolean |
isFailOnError()
Returns the value of the failOnError
property.
|
protected void |
openRedirector()
Set up properties on the Redirector and create output streams.
|
void |
setAlwaysLog(boolean alwaysLog)
If true, (error and non-error) output will be redirected
as specified while being sent to Ant's logging mechanism as if no
redirection had taken place.
|
void |
setAppend(boolean append)
If true, append output to existing file.
|
void |
setCreateEmptyFiles(boolean createEmptyFiles)
Whether output and error files should be created even when empty.
|
void |
setError(java.io.File error)
File the error output of the task is redirected to.
|
void |
setErrorProperty(java.lang.String errorProperty)
Property name whose value should be set to the error of
the task..
|
void |
setFailonerror(boolean fail)
Whether to fail (with a BuildException) if
ManagerServlet returns an error.
|
void |
setLogError(boolean logError)
Controls whether error output is logged.
|
void |
setOutput(java.io.File out)
File the output of the task is redirected to.
|
void |
setOutputproperty(java.lang.String outputProperty)
Property name whose value should be set to the output of
the task.
|
bindToOwner, execute, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleInput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
protected org.apache.tools.ant.taskdefs.Redirector redirector
protected org.apache.tools.ant.types.RedirectorElement redirectorElement
protected java.io.OutputStream redirectOutStream
protected java.io.OutputStream redirectErrStream
protected boolean failOnError
protected boolean redirectOutput
true
true when output redirection is requested for this task .
Default is to log on Ant log.protected boolean redirectorConfigured
true
when the configuration of the Redirector is
complete.protected boolean alwaysLog
public void setFailonerror(boolean fail)
public boolean isFailOnError()
public void setOutput(java.io.File out)
out
- name of the output filepublic void setError(java.io.File error)
error
- name of the error filepublic void setLogError(boolean logError)
logError
- if true the standard error is sent to the Ant log system
and not sent to output stream.public void setOutputproperty(java.lang.String outputProperty)
outputProperty
- property namepublic void setErrorProperty(java.lang.String errorProperty)
errorProperty
- property namepublic void setAppend(boolean append)
append
- if true, append output to existing filepublic void setAlwaysLog(boolean alwaysLog)
Redirector
itself.alwaysLog
- boolean
public void setCreateEmptyFiles(boolean createEmptyFiles)
createEmptyFiles
- boolean
.public void addConfiguredRedirector(org.apache.tools.ant.types.RedirectorElement redirectorElement)
RedirectorElement
to this task.redirectorElement
- RedirectorElement
.protected void openRedirector()
protected void closeRedirector()
protected void handleOutput(java.lang.String output)
handleOutput
in class org.apache.tools.ant.Task
output
- The output to log. Should not be null
.protected void handleFlush(java.lang.String output)
handleFlush
in class org.apache.tools.ant.Task
output
- The output to log. Should not be null
.protected void handleErrorOutput(java.lang.String output)
handleErrorOutput
in class org.apache.tools.ant.Task
output
- The error output to log. Should not be null
.protected void handleErrorFlush(java.lang.String output)
handleErrorFlush
in class org.apache.tools.ant.Task
output
- The error output to log. Should not be null
.protected void handleOutput(java.lang.String output, int priority)
output
- The output to log. Should not be null
.Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.