Apache JMeter

org.apache.jmeter.protocol.http.sampler
Class HTTPAbstractImpl

java.lang.Object
  extended by org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl
All Implemented Interfaces:
HTTPConstantsInterface, Interruptible
Direct Known Subclasses:
HTTPFileImpl, HTTPHCAbstractImpl, HTTPJavaImpl

public abstract class HTTPAbstractImpl
extends Object
implements Interruptible, HTTPConstantsInterface

Base class for HTTP implementations used by the HTTPSamplerProxy sampler.


Field Summary
protected  HTTPSamplerBase testElement
           
 
Fields inherited from interface org.apache.jmeter.protocol.http.util.HTTPConstantsInterface
APPLICATION_X_WWW_FORM_URLENCODED, CACHE_CONTROL, CONNECT, CONNECTION_CLOSE, DATE, DEFAULT_HTTP_PORT, DEFAULT_HTTP_PORT_STRING, DEFAULT_HTTPS_PORT, DEFAULT_HTTPS_PORT_STRING, DELETE, ENCODING_GZIP, ETAG, EXPIRES, GET, HEAD, HEADER_AUTHORIZATION, HEADER_CONNECTION, HEADER_CONTENT_DISPOSITION, HEADER_CONTENT_ENCODING, HEADER_CONTENT_LENGTH, HEADER_CONTENT_TYPE, HEADER_COOKIE, HEADER_HOST, HEADER_LOCAL_ADDRESS, HEADER_LOCATION, HEADER_SET_COOKIE, HTTP_1_1, IF_MODIFIED_SINCE, IF_NONE_MATCH, KEEP_ALIVE, LAST_MODIFIED, MULTIPART_FORM_DATA, OPTIONS, PATCH, POST, PROTOCOL_HTTP, PROTOCOL_HTTPS, PUT, TRACE, TRANSFER_ENCODING
 
Constructor Summary
protected HTTPAbstractImpl(HTTPSamplerBase testElement)
           
 
Method Summary
protected  HTTPSampleResult errorResult(Throwable t, HTTPSampleResult res)
          Invokes HTTPSamplerBase.errorResult(Throwable, HTTPSampleResult)
protected  Arguments getArguments()
          Invokes HTTPSamplerBase.getArguments()
protected  AuthManager getAuthManager()
          Invokes HTTPSamplerBase.getAuthManager()
protected  boolean getAutoRedirects()
          Invokes HTTPSamplerBase.getAutoRedirects()
protected  CacheManager getCacheManager()
          Invokes HTTPSamplerBase.getCacheManager()
protected  int getConnectTimeout()
          Invokes HTTPSamplerBase.getConnectTimeout()
protected  String getContentEncoding()
          Invokes HTTPSamplerBase.getContentEncoding()
protected  CookieManager getCookieManager()
          Invokes HTTPSamplerBase.getCookieManager()
protected  boolean getDoBrowserCompatibleMultipart()
          Invokes HTTPSamplerBase.getDoBrowserCompatibleMultipart()
protected  HeaderManager getHeaderManager()
          Invokes HTTPSamplerBase.getHeaderManager()
protected  HTTPFileArg[] getHTTPFiles()
          Invokes HTTPSamplerBase.getHTTPFiles()
protected  String getIpSource()
          Invokes HTTPSamplerBase.getIpSource()
protected  InetAddress getIpSourceAddress()
          Gets the IP source address (IP spoofing) if one has been provided.
protected  String getProxyHost()
          Invokes HTTPSamplerBase.getProxyHost()
protected  String getProxyPass()
          Invokes HTTPSamplerBase.getProxyPass()
protected  int getProxyPortInt()
          Invokes HTTPSamplerBase.getProxyPortInt()
protected  String getProxyUser()
          Invokes HTTPSamplerBase.getProxyUser()
protected  int getResponseTimeout()
          Invokes HTTPSamplerBase.getResponseTimeout()
protected  boolean getSendFileAsPostBody()
          Determine whether to send a file as the entire body of an entity enclosing request such as POST, PUT or PATCH.
protected  boolean getSendParameterValuesAsPostBody()
          Determine whether to send concatenated parameters as the entire body of an entity enclosing request such as POST, PUT or PATCH.
protected  boolean getUseKeepAlive()
          Invokes HTTPSamplerBase.getUseKeepAlive()
protected  boolean getUseMultipartForPost()
          Invokes HTTPSamplerBase.getUseMultipartForPost()
protected  boolean hasArguments()
          Invokes HTTPSamplerBase.hasArguments()
protected  boolean isMonitor()
          Invokes HTTPSamplerBase.isMonitor()
protected  boolean isSuccessCode(int errorLevel)
          Invokes HTTPSamplerBase.isSuccessCode(int)
protected  void notifyFirstSampleAfterLoopRestart()
           
protected  void notifySSLContextWasReset()
          Called by testIterationStart if the SSL Context was reset.
protected  byte[] readResponse(SampleResult res, BufferedInputStream in, int contentLength)
          Invokes HTTPSamplerBase.readResponse(SampleResult, InputStream, int)
protected  byte[] readResponse(SampleResult res, InputStream instream, int responseContentLength)
          Invokes HTTPSamplerBase.readResponse(SampleResult, InputStream, int)
protected  HTTPSampleResult resultProcessing(boolean areFollowingRedirect, int frameDepth, HTTPSampleResult res)
          Invokes HTTPSamplerBase.resultProcessing(boolean, int, HTTPSampleResult)
protected abstract  HTTPSampleResult sample(URL url, String method, boolean areFollowingRedirect, int frameDepth)
           
protected  void setUseKeepAlive(boolean b)
          Invokes HTTPSamplerBase.setUseKeepAlive(boolean)
protected  void threadFinished()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.jmeter.samplers.Interruptible
interrupt
 

Field Detail

testElement

protected final HTTPSamplerBase testElement
Constructor Detail

HTTPAbstractImpl

protected HTTPAbstractImpl(HTTPSamplerBase testElement)
Method Detail

sample

protected abstract HTTPSampleResult sample(URL url,
                                           String method,
                                           boolean areFollowingRedirect,
                                           int frameDepth)

threadFinished

protected void threadFinished()

notifyFirstSampleAfterLoopRestart

protected void notifyFirstSampleAfterLoopRestart()

errorResult

protected HTTPSampleResult errorResult(Throwable t,
                                       HTTPSampleResult res)
Invokes HTTPSamplerBase.errorResult(Throwable, HTTPSampleResult)


getArguments

protected Arguments getArguments()
Invokes HTTPSamplerBase.getArguments()


getAuthManager

protected AuthManager getAuthManager()
Invokes HTTPSamplerBase.getAuthManager()


getAutoRedirects

protected boolean getAutoRedirects()
Invokes HTTPSamplerBase.getAutoRedirects()


getCacheManager

protected CacheManager getCacheManager()
Invokes HTTPSamplerBase.getCacheManager()


getConnectTimeout

protected int getConnectTimeout()
Invokes HTTPSamplerBase.getConnectTimeout()


getContentEncoding

protected String getContentEncoding()
Invokes HTTPSamplerBase.getContentEncoding()

Returns:
the encoding of the content, i.e. its charset name

getCookieManager

protected CookieManager getCookieManager()
Invokes HTTPSamplerBase.getCookieManager()


getHeaderManager

protected HeaderManager getHeaderManager()
Invokes HTTPSamplerBase.getHeaderManager()


getHTTPFiles

protected HTTPFileArg[] getHTTPFiles()
Invokes HTTPSamplerBase.getHTTPFiles()


getIpSource

protected String getIpSource()
Invokes HTTPSamplerBase.getIpSource()


getIpSourceAddress

protected InetAddress getIpSourceAddress()
                                  throws UnknownHostException,
                                         SocketException
Gets the IP source address (IP spoofing) if one has been provided.

Returns:
the IP source address to use (or null, if none provided or the device address could not be found)
Throws:
UnknownHostException
SocketException

getProxyHost

protected String getProxyHost()
Invokes HTTPSamplerBase.getProxyHost()


getProxyPass

protected String getProxyPass()
Invokes HTTPSamplerBase.getProxyPass()


getProxyPortInt

protected int getProxyPortInt()
Invokes HTTPSamplerBase.getProxyPortInt()


getProxyUser

protected String getProxyUser()
Invokes HTTPSamplerBase.getProxyUser()


getResponseTimeout

protected int getResponseTimeout()
Invokes HTTPSamplerBase.getResponseTimeout()


getSendFileAsPostBody

protected boolean getSendFileAsPostBody()
Determine whether to send a file as the entire body of an entity enclosing request such as POST, PUT or PATCH. Invokes HTTPSamplerBase.getSendFileAsPostBody()


getSendParameterValuesAsPostBody

protected boolean getSendParameterValuesAsPostBody()
Determine whether to send concatenated parameters as the entire body of an entity enclosing request such as POST, PUT or PATCH. Invokes HTTPSamplerBase.getSendParameterValuesAsPostBody()


getUseKeepAlive

protected boolean getUseKeepAlive()
Invokes HTTPSamplerBase.getUseKeepAlive()


getUseMultipartForPost

protected boolean getUseMultipartForPost()
Invokes HTTPSamplerBase.getUseMultipartForPost()


getDoBrowserCompatibleMultipart

protected boolean getDoBrowserCompatibleMultipart()
Invokes HTTPSamplerBase.getDoBrowserCompatibleMultipart()


hasArguments

protected boolean hasArguments()
Invokes HTTPSamplerBase.hasArguments()


isMonitor

protected boolean isMonitor()
Invokes HTTPSamplerBase.isMonitor()


isSuccessCode

protected boolean isSuccessCode(int errorLevel)
Invokes HTTPSamplerBase.isSuccessCode(int)


readResponse

protected byte[] readResponse(SampleResult res,
                              InputStream instream,
                              int responseContentLength)
                       throws IOException
Invokes HTTPSamplerBase.readResponse(SampleResult, InputStream, int)

Throws:
IOException

readResponse

protected byte[] readResponse(SampleResult res,
                              BufferedInputStream in,
                              int contentLength)
                       throws IOException
Invokes HTTPSamplerBase.readResponse(SampleResult, InputStream, int)

Throws:
IOException

resultProcessing

protected HTTPSampleResult resultProcessing(boolean areFollowingRedirect,
                                            int frameDepth,
                                            HTTPSampleResult res)
Invokes HTTPSamplerBase.resultProcessing(boolean, int, HTTPSampleResult)


setUseKeepAlive

protected void setUseKeepAlive(boolean b)
Invokes HTTPSamplerBase.setUseKeepAlive(boolean)


notifySSLContextWasReset

protected void notifySSLContextWasReset()
Called by testIterationStart if the SSL Context was reset. This implementation does nothing.


Apache JMeter

Copyright © 1998-2013 Apache Software Foundation. All Rights Reserved.