|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.jelly.TagSupport org.apache.commons.latka.jelly.RequestTag
public class RequestTag
Field Summary | |
---|---|
protected boolean |
_followRedirects
|
protected String |
_host
|
protected String |
_httpVersion
|
protected String |
_label
|
protected static org.apache.log4j.Category |
_log
|
protected int |
_method
|
protected String |
_path
|
protected int |
_port
|
protected String |
_proxyHost
|
protected int |
_proxyPort
|
protected Request |
_request
|
protected boolean |
_requestExecuted
|
protected Response |
_response
|
protected boolean |
_secure
|
protected Session |
_session
|
Fields inherited from class org.apache.commons.jelly.TagSupport |
---|
body, context, hasTrimmed, parent, shouldTrim |
Constructor Summary | |
---|---|
RequestTag()
|
Method Summary | |
---|---|
void |
doTag(org.apache.commons.jelly.XMLOutput xmlOutput)
Wraps Latka tests, provides some defaults for host, port etc. |
protected Session |
findSession()
|
Request |
getRequest()
|
boolean |
getRequestExecuted()
|
Response |
getResponse()
The first time this method is called, a live HTTP call will be made to the server, returning null if the response cannot be obtained. |
protected SuiteSettings |
getSuiteSettings()
get the suite settings from SuiteTag |
void |
setFollowRedirects(String followRedirects)
Sets whether or not to transmit the request over SSL. |
void |
setHost(String host)
Setter for host |
void |
setLabel(String label)
Set the label for this suite |
void |
setMethod(String method)
Sets the HTTP method to use. |
void |
setPath(String path)
Sets the path of the document on the server, combined with the host and port |
void |
setPort(int port)
Setter for port |
void |
setProxyHost(String host)
Setter for defaultProxyHost |
void |
setProxyPort(int port)
Setter for defaultProxyPort |
void |
setSecure(String secure)
Sets whether or not to transmit the request over SSL. |
void |
setVersion(String version)
HTTP version to use. |
Methods inherited from class org.apache.commons.jelly.TagSupport |
---|
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String _host
protected int _port
protected String _proxyHost
protected int _proxyPort
protected String _label
protected int _method
protected String _path
protected boolean _secure
protected boolean _followRedirects
protected String _httpVersion
protected Request _request
protected Response _response
protected Session _session
protected boolean _requestExecuted
protected static final org.apache.log4j.Category _log
Constructor Detail |
---|
public RequestTag()
Method Detail |
---|
public void doTag(org.apache.commons.jelly.XMLOutput xmlOutput) throws org.apache.commons.jelly.JellyTagException
xmlOutput
- a place to write output
org.apache.commons.jelly.JellyTagException
- if an HTTP request could not be createdpublic Request getRequest()
protected Session findSession()
public boolean getRequestExecuted()
public Response getResponse() throws LatkaException
LatkaException
- error creating the Request (unrecoverable)protected SuiteSettings getSuiteSettings()
public void setHost(String host)
host
- host for the requestpublic void setPort(int port)
port
- port for all requestspublic void setProxyHost(String host)
defaultHost
- defaultProxyHost for all requestspublic void setProxyPort(int port)
defaultPort
- defaultProxyPort for all requestspublic void setLabel(String label)
label
- suite labelpublic void setMethod(String method) throws UnsupportedOperationException
method
- set method to post, get or head
UnsupportedOperationException
- if an unsupported HTTP method is setpublic void setPath(String path)
path
- Path to the document on the serverpublic void setSecure(String secure)
secure
- whether or not this request is SSLpublic void setFollowRedirects(String followRedirects)
secure
- whether or not this request is SSLpublic void setVersion(String version)
version
- HTTP specification version
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |