Class CssParser

java.lang.Object
org.apache.jmeter.protocol.http.parser.CssParser
All Implemented Interfaces:
LinkExtractorParser

public class CssParser extends Object implements LinkExtractorParser
CSS Parser used to extract from CSS files external urls
Since:
3.0
  • Constructor Details

    • CssParser

      public CssParser()
  • Method Details

    • getEmbeddedResourceURLs

      public Iterator<URL> getEmbeddedResourceURLs(String userAgent, byte[] data, URL baseUrl, String encoding) throws LinkExtractorParseException
      Description copied from interface: LinkExtractorParser
      Get the URLs for all the resources that a browser would automatically download following the download of the content, that is: images, stylesheets, javascript files, applets, etc...

      URLs should not appear twice in the returned iterator.

      Malformed URLs can be reported to the caller by having the Iterator return the corresponding RL String. Overall problems parsing the html should be reported by throwing an HTMLParseException.

      Specified by:
      getEmbeddedResourceURLs in interface LinkExtractorParser
      Parameters:
      userAgent - User Agent
      data - Response data
      baseUrl - Base URL from which the HTML code was obtained
      encoding - Charset
      Returns:
      an Iterator for the resource URLs
      Throws:
      LinkExtractorParseException - when extracting the links fails
      See Also:
    • isReusable

      public boolean isReusable()
      Specified by:
      isReusable in interface LinkExtractorParser