Class BaseParser
java.lang.Object
org.apache.jmeter.protocol.http.parser.BaseParser
- All Implemented Interfaces:
LinkExtractorParser
- Direct Known Subclasses:
HTMLParser
BaseParser is the base class for
LinkExtractorParser
It is advised to make subclasses reusable across parsing, so BaseParser
isReusable()
returns true by default- Since:
- 3.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LinkExtractorParser
Factory method of parsers.boolean
Parsers should over-ride this method if the parser class is re-usable, in which case the class will be cached for the next getParser() call.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.protocol.http.parser.LinkExtractorParser
getEmbeddedResourceURLs
-
Constructor Details
-
BaseParser
protected BaseParser()Constructor for BaseParser
-
-
Method Details
-
getParser
public static LinkExtractorParser getParser(String parserClassName) throws LinkExtractorParseException Factory method of parsers. Instances might get cached, whenLinkExtractorParser.isReusable()
on the newly created instance equalstrue
.- Parameters:
parserClassName
- name of the class that should be used to create new parsers- Returns:
- a possibly cached instance of the wanted
LinkExtractorParser
- Throws:
LinkExtractorParseException
- when a new instance could not be instantiated
-
isReusable
public boolean isReusable()Parsers should over-ride this method if the parser class is re-usable, in which case the class will be cached for the next getParser() call.- Specified by:
isReusable
in interfaceLinkExtractorParser
- Returns:
true
if the Parser is reusable
-