Java Doc for HTTPSampler.java in  » Testing » jakarta-jmeter » org » apache » jmeter » protocol » http » sampler » 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 » jakarta jmeter » org.apache.jmeter.protocol.http.sampler 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase
   org.apache.jmeter.protocol.http.sampler.HTTPSampler

All known Subclasses:   org.apache.jmeter.protocol.http.sampler.AccessLogSampler,
HTTPSampler
public class HTTPSampler extends HTTPSamplerBase (Code)
A sampler which understands all the parts necessary to read statistics about HTTP requests, including cookies and authentication.



Constructor Summary
public  HTTPSampler()
     Constructor for the HTTPSampler object.

Method Summary
protected  voiddisconnect(HttpURLConnection conn)
    
protected  StringgetResponseHeaders(HttpURLConnection conn)
    
protected  byte[]readResponse(HttpURLConnection conn, SampleResult res)
     Reads the response from the URL connection.
protected  HTTPSampleResultsample(URL url, String method, boolean areFollowingRedirect, int frameDepth)
     Samples the URL passed in and stores the result in HTTPSampleResult, following redirects and downloading page resources as appropriate.

When getting a redirect target, redirects are not followed and resources are not downloaded.

protected  StringsendPostData(URLConnection connection)
     Send POST data from Entry to the open connection. This also handles sending data for PUT requests
Parameters:
  connection - URLConnection where POST data should be sent a String show what was posted.
protected  voidsetPostHeaders(URLConnection conn)
     Set request headers in preparation to opening a connection.
protected  HttpURLConnectionsetupConnection(URL u, String method, HTTPSampleResult res)
     Returns an HttpURLConnection fully ready to attempt connection.


Constructor Detail
HTTPSampler
public HTTPSampler()(Code)
Constructor for the HTTPSampler object. Consider using HTTPSamplerFactory.newInstance() instead




Method Detail
disconnect
protected void disconnect(HttpURLConnection conn)(Code)



getResponseHeaders
protected String getResponseHeaders(HttpURLConnection conn)(Code)
Gets the ResponseHeaders from the URLConnection
Parameters:
  conn - connection from which the headers are read string containing the headers, one per line



readResponse
protected byte[] readResponse(HttpURLConnection conn, SampleResult res) throws IOException(Code)
Reads the response from the URL connection.
Parameters:
  conn - URL from which to read response response content
exception:
  IOException - if an I/O exception occurs



sample
protected HTTPSampleResult sample(URL url, String method, boolean areFollowingRedirect, int frameDepth)(Code)
Samples the URL passed in and stores the result in HTTPSampleResult, following redirects and downloading page resources as appropriate.

When getting a redirect target, redirects are not followed and resources are not downloaded. The caller will take care of this.
Parameters:
  url - URL to sample
Parameters:
  method - HTTP method: GET, POST,...
Parameters:
  areFollowingRedirect - whether we're getting a redirect target
Parameters:
  frameDepth - Depth of this target in the frame structure. Used only toprevent infinite recursion. results of the sampling




sendPostData
protected String sendPostData(URLConnection connection) throws IOException(Code)
Send POST data from Entry to the open connection. This also handles sending data for PUT requests
Parameters:
  connection - URLConnection where POST data should be sent a String show what was posted. Will not contain actual file upload content
exception:
  IOException - if an I/O exception occurs



setPostHeaders
protected void setPostHeaders(URLConnection conn) throws IOException(Code)
Set request headers in preparation to opening a connection.
Parameters:
  conn - URLConnection to set headers on
exception:
  IOException - if an I/O exception occurs



setupConnection
protected HttpURLConnection setupConnection(URL u, String method, HTTPSampleResult res) throws IOException(Code)
Returns an HttpURLConnection fully ready to attempt connection. This means it sets the request method (GET or POST), headers, cookies, and authorization for the URL request.

The request infos are saved into the sample result if one is provided.
Parameters:
  u - URL of the URL request
Parameters:
  method - GET, POST etc
Parameters:
  res - sample result to save request infos to HttpURLConnection ready for .connect
exception:
  IOException - if an I/O Exception occurs




Fields inherited from org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase
final public static String ARGUMENTS(Code)(Java Doc)
final public static String AUTH_MANAGER(Code)(Java Doc)
final public static String AUTO_REDIRECTS(Code)(Java Doc)
final public static String CLIENT(Code)(Java Doc)
final public static String CONTENT_ENCODING(Code)(Java Doc)
final public static String CONTENT_TYPE(Code)(Java Doc)
final public static String COOKIE_MANAGER(Code)(Java Doc)
final public static String DEFAULT_METHOD(Code)(Java Doc)
final public static String DOMAIN(Code)(Java Doc)
final public static String DO_MULTIPART_POST(Code)(Java Doc)
final public static String EMBEDDED_URL_RE(Code)(Java Doc)
final public static String FILE_FIELD(Code)(Java Doc)
final public static String FILE_NAME(Code)(Java Doc)
final public static String FOLLOW_REDIRECTS(Code)(Java Doc)
final public static String HEADER_MANAGER(Code)(Java Doc)
final public static String IMAGE_PARSER(Code)(Java Doc)
final public static String IMPLEMENTATION(Code)(Java Doc)
final protected static int MAX_FRAME_DEPTH(Code)(Java Doc)
final protected static int MAX_REDIRECTS(Code)(Java Doc)
final public static String METHOD(Code)(Java Doc)
final public static String MIMETYPE(Code)(Java Doc)
final public static String MONITOR(Code)(Java Doc)
final protected static String NON_HTTP_RESPONSE_CODE(Code)(Java Doc)
final protected static String NON_HTTP_RESPONSE_MESSAGE(Code)(Java Doc)
final public static String PATH(Code)(Java Doc)
final public static String PORT(Code)(Java Doc)
final public static String PROTOCOL(Code)(Java Doc)
final public static int UNSPECIFIED_PORT(Code)(Java Doc)
final public static String UNSPECIFIED_PORT_AS_STRING(Code)(Java Doc)
final public static String URL(Code)(Java Doc)
final public static String USE_KEEPALIVE(Code)(Java Doc)

Methods inherited from org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase
public void addArgument(String name, String value)(Code)(Java Doc)
public void addArgument(String name, String value, String metadata)(Code)(Java Doc)
public void addEncodedArgument(String name, String value)(Code)(Java Doc)
public void addEncodedArgument(String name, String value, String metaData, String contentEncoding)(Code)(Java Doc)
public void addEncodedArgument(String name, String value, String metaData)(Code)(Java Doc)
public void addNonEncodedArgument(String name, String value, String metadata)(Code)(Java Doc)
public void addTestElement(TestElement el)(Code)(Java Doc)
public Object clone()(Code)(Java Doc)
protected HTTPSampleResult downloadPageResources(HTTPSampleResult res, HTTPSampleResult container, int frameDepth)(Code)(Java Doc)
protected static String encodeBackSlashes(String value)(Code)(Java Doc)
protected String encodeSpaces(String path)(Code)(Java Doc)
protected HTTPSampleResult errorResult(Throwable e, HTTPSampleResult res)(Code)(Java Doc)
protected HTTPSampleResult followRedirects(HTTPSampleResult res, int frameDepth)(Code)(Java Doc)
public Arguments getArguments()(Code)(Java Doc)
public AuthManager getAuthManager()(Code)(Java Doc)
public boolean getAutoRedirects()(Code)(Java Doc)
public String getClient()(Code)(Java Doc)
public String getContentEncoding()(Code)(Java Doc)
public CookieManager getCookieManager()(Code)(Java Doc)
public static int getDefaultPort(String protocol, int port)(Code)(Java Doc)
public boolean getDoMultipartPost()(Code)(Java Doc)
public String getDomain()(Code)(Java Doc)
public String getEmbeddedUrlRE()(Code)(Java Doc)
public String getFileField()(Code)(Java Doc)
public String getFilename()(Code)(Java Doc)
public boolean getFollowRedirects()(Code)(Java Doc)
public HeaderManager getHeaderManager()(Code)(Java Doc)
public String getImplementation()(Code)(Java Doc)
public String getMethod()(Code)(Java Doc)
public String getMimetype()(Code)(Java Doc)
public String getMonitor()(Code)(Java Doc)
public String getPath()(Code)(Java Doc)
public int getPort()(Code)(Java Doc)
public String getProtocol()(Code)(Java Doc)
public String getQueryString()(Code)(Java Doc)
public String getQueryString(String contentEncoding)(Code)(Java Doc)
public boolean getSendFileAsPostBody()(Code)(Java Doc)
public boolean getSendParameterValuesAsPostBody()(Code)(Java Doc)
public URL getUrl() throws MalformedURLException(Code)(Java Doc)
public boolean getUseKeepAlive()(Code)(Java Doc)
public boolean getUseMultipartForPost()(Code)(Java Doc)
public static String[] getValidMethodsAsArray()(Code)(Java Doc)
public boolean hasArguments()(Code)(Java Doc)
protected boolean hasUploadableFiles()(Code)(Java Doc)
public boolean isImageParser()(Code)(Java Doc)
public boolean isMonitor()(Code)(Java Doc)
public boolean isProtocolDefaultPort()(Code)(Java Doc)
public static boolean isSecure(String protocol)(Code)(Java Doc)
public static boolean isSecure(URL url)(Code)(Java Doc)
protected boolean isSuccessCode(int code)(Code)(Java Doc)
public void parseArguments(String queryString, String contentEncoding)(Code)(Java Doc)
public void parseArguments(String queryString)(Code)(Java Doc)
protected HTTPSampleResult resultProcessing(boolean areFollowingRedirect, int frameDepth, HTTPSampleResult res)(Code)(Java Doc)
public SampleResult sample(Entry e)(Code)(Java Doc)
public SampleResult sample()(Code)(Java Doc)
abstract protected HTTPSampleResult sample(URL u, String method, boolean areFollowingRedirect, int depth)(Code)(Java Doc)
public void setArguments(Arguments value)(Code)(Java Doc)
public void setAuthManager(AuthManager value)(Code)(Java Doc)
public void setAutoRedirects(boolean value)(Code)(Java Doc)
public void setClient(String client)(Code)(Java Doc)
public void setContentEncoding(String value)(Code)(Java Doc)
public void setCookieManager(CookieManager value)(Code)(Java Doc)
public void setDoMultipartPost(boolean value)(Code)(Java Doc)
public void setDomain(String value)(Code)(Java Doc)
public void setEmbeddedUrlRE(String regex)(Code)(Java Doc)
public void setFileField(String value)(Code)(Java Doc)
public void setFilename(String value)(Code)(Java Doc)
public void setFollowRedirects(boolean value)(Code)(Java Doc)
public void setHeaderManager(HeaderManager value)(Code)(Java Doc)
public void setImageParser(boolean parseImages)(Code)(Java Doc)
public void setImplementation(String value)(Code)(Java Doc)
public void setMethod(String value)(Code)(Java Doc)
public void setMimetype(String value)(Code)(Java Doc)
public void setMonitor(String value)(Code)(Java Doc)
public void setMonitor(boolean truth)(Code)(Java Doc)
public void setPath(String path)(Code)(Java Doc)
public void setPath(String path, String contentEncoding)(Code)(Java Doc)
public void setPort(int value)(Code)(Java Doc)
public void setProtocol(String value)(Code)(Java Doc)
public void setUseKeepAlive(boolean value)(Code)(Java Doc)
public void testEnded()(Code)(Java Doc)
public void testEnded(String host)(Code)(Java Doc)
public void testIterationStart(LoopIterationEvent event)(Code)(Java Doc)
public void testStarted()(Code)(Java Doc)
public void testStarted(String host)(Code)(Java Doc)
public void threadFinished()(Code)(Java Doc)
public void threadStarted()(Code)(Java Doc)
public String toString()(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.