Java Doc for WebRequest.java in  » Testing » HttpUnit » com » meterware » httpunit » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » HttpUnit » com.meterware.httpunit 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.meterware.httpunit.WebRequest

All known Subclasses:   com.meterware.httpunit.HeaderOnlyWebRequest,  com.meterware.httpunit.MessageBodyWebRequest,
WebRequest
abstract public class WebRequest (Code)
A request sent to a web server.


Field Summary
final static  StringNEW_WINDOW
     The target indicating a new, empty window.
final static  StringPARENT_FRAME
     The target indicating the parent of a frame.
final static  StringREFERER_HEADER_NAME
    
final static  StringSAME_FRAME
     The target indicating the same frame.
final static  StringTOP_FRAME
     The target indicating the topmost frame of a window.

Constructor Summary
protected  WebRequest(String urlString)
     Constructs a web request using an absolute URL string.
protected  WebRequest(URL urlBase, String urlString)
     Constructs a web request using a base URL and a relative URL string.
protected  WebRequest(WebRequest baseRequest, String urlString, String target)
     Constructs a web request using a base request and a relative URL string.
protected  WebRequest(URL urlBase, String urlString, String target)
     Constructs a web request using a base URL, a relative URL string, and a target.
protected  WebRequest(URL urlBase, String urlString, FrameSelector frame, String target)
     Constructs a web request using a base URL, a relative URL string, and a target.
protected  WebRequest(WebForm sourceForm, ParameterHolder parameterHolder, SubmitButton button, int x, int y)
     Constructs a web request from a form.
protected  WebRequest(WebRequestSource requestSource, ParameterHolder parameterHolder)
    

Method Summary
protected  voidcompleteRequest(URLConnection connection)
     Performs any additional processing necessary to complete the request.
final protected  StringgetCharacterSet()
     Returns the character set required for this request.
protected  StringgetContentType()
     Returns the content type of this request.
 HashtablegetHeaderDictionary()
    
public  DictionarygetHeaders()
     Returns a copy of the headers to be sent with this request.
abstract public  StringgetMethod()
     Returns the HTTP method defined for this request.
public  StringgetParameter(String name)
     Returns the value of a parameter in this web request.
final protected  ParameterHoldergetParameterHolder()
    
public  String[]getParameterValues(String name)
     Returns the multiple default values of the named parameter.
public  StringgetQueryString()
     Returns the query string defined for this request.
 StringgetReferer()
    
public  String[]getRequestParameterNames()
     Returns an array of all parameter names defined as part of this web request.
 FrameSelectorgetSourceFrame()
     Returns the frame from which this request originates.
public  StringgetTarget()
     Returns the target for this web request.
public  URLgetURL()
     Returns the final URL associated with this web request.
final protected  URLgetURLBase()
    
protected  StringgetURLString()
    
 WebRequestSourcegetWebRequestSource()
    
public  booleanisFileParameter(String name)
     Returns true if the specified parameter is a file field.
protected  booleanisMimeEncoded()
     Returns true if this request is to be MIME-encoded.
protected  booleanmaySelectFile(String parameterName)
     Returns true if selectFile may be called with this parameter.
static  ParameterHoldernewParameterHolder(WebRequestSource requestSource)
    
public  voidremoveParameter(String name)
     Removes a parameter from this web request.
public  voidselectFile(String parameterName, File file)
     Sets the file for a parameter upload in a web request.
public  voidselectFile(String parameterName, File file, String contentType)
     Sets the file for a parameter upload in a web request.
public  voidselectFile(String parameterName, String fileName, InputStream inputStream, String contentType)
     Sets the file for a parameter upload in a web request.
public  voidsetHeaderField(String headerName, String headerValue)
     Sets the value of a header to be sent with this request.
public  voidsetImageButtonClickPosition(int x, int y)
     Specifies the click position for the submit button.
protected  voidsetMimeEncoded(boolean mimeEncoded)
     Selects whether MIME-encoding will be used for this request.
public  voidsetParameter(String name, String value)
     Sets the value of a parameter in a web request.
public  voidsetParameter(String name, String[] values)
     Sets the multiple values of a parameter in a web request.
public  voidsetParameter(String parameterName, UploadFileSpec[] files)
     Sets the multiple values of a file upload parameter in a web request.
public  StringtoString()
    
protected  voidwriteMessageBody(OutputStream stream)
     Writes the contents of the message body to the specified stream.

Field Detail
NEW_WINDOW
final static String NEW_WINDOW(Code)
The target indicating a new, empty window. *



PARENT_FRAME
final static String PARENT_FRAME(Code)
The target indicating the parent of a frame. *



REFERER_HEADER_NAME
final static String REFERER_HEADER_NAME(Code)



SAME_FRAME
final static String SAME_FRAME(Code)
The target indicating the same frame. *



TOP_FRAME
final static String TOP_FRAME(Code)
The target indicating the topmost frame of a window. *




Constructor Detail
WebRequest
protected WebRequest(String urlString)(Code)
Constructs a web request using an absolute URL string.



WebRequest
protected WebRequest(URL urlBase, String urlString)(Code)
Constructs a web request using a base URL and a relative URL string.



WebRequest
protected WebRequest(WebRequest baseRequest, String urlString, String target) throws MalformedURLException(Code)
Constructs a web request using a base request and a relative URL string.



WebRequest
protected WebRequest(URL urlBase, String urlString, String target)(Code)
Constructs a web request using a base URL, a relative URL string, and a target.



WebRequest
protected WebRequest(URL urlBase, String urlString, FrameSelector frame, String target)(Code)
Constructs a web request using a base URL, a relative URL string, and a target.



WebRequest
protected WebRequest(WebForm sourceForm, ParameterHolder parameterHolder, SubmitButton button, int x, int y)(Code)
Constructs a web request from a form.



WebRequest
protected WebRequest(WebRequestSource requestSource, ParameterHolder parameterHolder)(Code)




Method Detail
completeRequest
protected void completeRequest(URLConnection connection) throws IOException(Code)
Performs any additional processing necessary to complete the request.



getCharacterSet
final protected String getCharacterSet()(Code)
Returns the character set required for this request.



getContentType
protected String getContentType()(Code)
Returns the content type of this request. If null, no content is specified.



getHeaderDictionary
Hashtable getHeaderDictionary()(Code)



getHeaders
public Dictionary getHeaders()(Code)
Returns a copy of the headers to be sent with this request.



getMethod
abstract public String getMethod()(Code)
Returns the HTTP method defined for this request.



getParameter
public String getParameter(String name)(Code)
Returns the value of a parameter in this web request. the value of the named parameter, or empty stringif it is not set.



getParameterHolder
final protected ParameterHolder getParameterHolder()(Code)



getParameterValues
public String[] getParameterValues(String name)(Code)
Returns the multiple default values of the named parameter.



getQueryString
public String getQueryString()(Code)
Returns the query string defined for this request. The query string is sent to the HTTP server as part of the request header. This default implementation returns an empty string.



getReferer
String getReferer()(Code)



getRequestParameterNames
public String[] getRequestParameterNames()(Code)
Returns an array of all parameter names defined as part of this web request.
since:
   1.3.1



getSourceFrame
FrameSelector getSourceFrame()(Code)
Returns the frame from which this request originates.



getTarget
public String getTarget()(Code)
Returns the target for this web request.



getURL
public URL getURL() throws MalformedURLException(Code)
Returns the final URL associated with this web request.



getURLBase
final protected URL getURLBase()(Code)



getURLString
protected String getURLString()(Code)



getWebRequestSource
WebRequestSource getWebRequestSource()(Code)



isFileParameter
public boolean isFileParameter(String name)(Code)
Returns true if the specified parameter is a file field.



isMimeEncoded
protected boolean isMimeEncoded()(Code)
Returns true if this request is to be MIME-encoded.



maySelectFile
protected boolean maySelectFile(String parameterName)(Code)
Returns true if selectFile may be called with this parameter.



newParameterHolder
static ParameterHolder newParameterHolder(WebRequestSource requestSource)(Code)



removeParameter
public void removeParameter(String name)(Code)
Removes a parameter from this web request.



selectFile
public void selectFile(String parameterName, File file)(Code)
Sets the file for a parameter upload in a web request.



selectFile
public void selectFile(String parameterName, File file, String contentType)(Code)
Sets the file for a parameter upload in a web request.



selectFile
public void selectFile(String parameterName, String fileName, InputStream inputStream, String contentType)(Code)
Sets the file for a parameter upload in a web request.



setHeaderField
public void setHeaderField(String headerName, String headerValue)(Code)
Sets the value of a header to be sent with this request. A header set here will override any matching header set in the WebClient when the request is actually sent.



setImageButtonClickPosition
public void setImageButtonClickPosition(int x, int y) throws IllegalRequestParameterException(Code)
Specifies the click position for the submit button. When a user clioks on an image button, not only the name and value of the button, but also the position of the mouse at the time of the click is submitted with the form. This method allows the caller to override the position selected when this request was created.
exception:
  IllegalRequestParameterException - thrown if the request was not created from a form with an image button.



setMimeEncoded
protected void setMimeEncoded(boolean mimeEncoded)(Code)
Selects whether MIME-encoding will be used for this request. MIME-encoding changes the way the request is sent and is required for requests which include file parameters. This method may only be called for a POST request which was not created from a form.



setParameter
public void setParameter(String name, String value)(Code)
Sets the value of a parameter in a web request.



setParameter
public void setParameter(String name, String[] values)(Code)
Sets the multiple values of a parameter in a web request.



setParameter
public void setParameter(String parameterName, UploadFileSpec[] files)(Code)
Sets the multiple values of a file upload parameter in a web request.



toString
public String toString()(Code)



writeMessageBody
protected void writeMessageBody(OutputStream stream) throws IOException(Code)
Writes the contents of the message body to the specified stream.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.