|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.ProjectComponent org.apache.tools.ant.Task net.sf.fikin.ant.httpclientanttask.BaseAntMethod net.sf.fikin.ant.httpclientanttask.BaseResponseAntMethod
public abstract class BaseResponseAntMethod
Nested Class Summary | |
---|---|
class |
BaseResponseAntMethod.ProjectLogOutputStream
|
class |
BaseResponseAntMethod.ProjectLogWriter
Wraps Ant's Project logging into a java.io.Writer interface |
Field Summary |
---|
Fields inherited from class org.apache.tools.ant.Task |
---|
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
project |
Constructor Summary | |
---|---|
BaseResponseAntMethod()
|
Method Summary | |
---|---|
void |
after_execute_method()
after actual execute() strategy method, customize if needed but always call |
protected void |
check()
check the consistency of the object call it before calling @link #process(Project, HttpMethod) in order to guarantee a correct execution checks for: logProcessAs is valid and logLevel is valid too |
protected void |
closeOutput()
close output stream if applicable |
boolean |
getLogAppend()
should append to the log file if exists |
java.io.File |
getLogFile()
get the log file to |
java.lang.String |
getLogLevel()
get the logging level, one of "none", "all", "content" or "header" |
java.lang.String |
getLogProcessAs()
get logging mode, one of "text", "xml" or "binary" |
protected java.io.OutputStream |
getOutStream()
get the logging output stream |
protected java.io.Writer |
getOutWriter()
get the actual log writer |
protected void |
initOutputHandler()
check the settings and create appropriate output handler |
protected void |
printBytes(byte[] arr,
int len)
print byte array to the output |
protected void |
printString(java.lang.String str)
print single string to the output |
protected void |
processResponse(org.apache.commons.httpclient.HttpMethod method)
process response stream as indicated by the settings |
void |
setLogAppend(boolean appendTo)
do an append to the log file please, by default false |
void |
setLogFile(java.io.File file)
set the log file for all the response data |
void |
setLogLevel(java.lang.String s)
set the loggin level of the response data one of: heaqder - will log only http-header response data content - will log only the http-response data all - will log both none - will log nothing by default it is "content" |
void |
setLogProcessAs(java.lang.String s)
set logging format one of: text - will log as text data xml - will log as markup language binary - will log in a binary mode by default it is "text" |
protected void |
setOutStream(java.io.OutputStream o)
assign the actual writer as stream |
protected void |
setOutWriter(java.io.Writer o)
assign the actual writer |
Methods inherited from class net.sf.fikin.ant.httpclientanttask.BaseAntMethod |
---|
addProperty, before_execute_method, clearHttpClient, createProxy, createUserCredentials, execute_method, execute, getConnectionTimeout, getCookiePolicy, getFailOnError, getHttpClient, getHttpMethod, getProperties, getProxy, getRetryAttempts, getShutdown, getSslAcceptUntrusted, getUrl, getUserCredentials, newHttpMethod, setConnectionTimeout, setCookiePolicy, setFailOnError, setHttpMethod, setProperties, setProxy, setRetryAttempts, setShutdown, setSslAcceptUntrusted, setUrl, setUserCredentials |
Methods inherited from class org.apache.tools.ant.Task |
---|
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
getProject, setProject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BaseResponseAntMethod()
Method Detail |
---|
public void setLogFile(java.io.File file)
file
- to log topublic java.io.File getLogFile()
public void setLogAppend(boolean appendTo)
appendTo
- if set to true will append the data if the file existspublic boolean getLogAppend()
public void setLogLevel(java.lang.String s)
s
- public java.lang.String getLogLevel()
public void setLogProcessAs(java.lang.String s)
s
- public java.lang.String getLogProcessAs()
protected void setOutWriter(java.io.Writer o)
o
- protected java.io.Writer getOutWriter()
protected void setOutStream(java.io.OutputStream o)
o
- protected java.io.OutputStream getOutStream()
protected void check() throws org.apache.tools.ant.BuildException
check
in class BaseAntMethod
org.apache.tools.ant.BuildException
public void after_execute_method() throws org.apache.tools.ant.BuildException
after_execute_method
in class BaseAntMethod
org.apache.tools.ant.BuildException
protected void processResponse(org.apache.commons.httpclient.HttpMethod method) throws org.apache.tools.ant.BuildException, java.io.FileNotFoundException, java.io.IOException
org.apache.tools.ant.BuildException
java.io.FileNotFoundException
java.io.IOException
protected void printString(java.lang.String str) throws java.io.IOException
str
-
java.io.IOException
protected void printBytes(byte[] arr, int len) throws java.io.IOException
arr
- len
-
java.io.IOException
protected void closeOutput() throws java.io.IOException
java.io.IOException
protected void initOutputHandler() throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |