|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jmeter.protocol.http.parser.HTMLParser
public abstract class HTMLParser
HtmlParsers can parse HTML content to obtain URLs.
Field Summary | |
---|---|
protected static java.lang.String |
ATT_BACKGROUND
|
protected static java.lang.String |
ATT_HREF
|
protected static java.lang.String |
ATT_IS_IMAGE
|
protected static java.lang.String |
ATT_REL
|
protected static java.lang.String |
ATT_SRC
|
protected static java.lang.String |
ATT_STYLE
|
protected static java.lang.String |
ATT_TYPE
|
static java.lang.String |
DEFAULT_PARSER
|
static java.lang.String |
PARSER_CLASSNAME
|
protected static java.lang.String |
STYLESHEET
|
protected static java.lang.String |
TAG_APPLET
|
protected static java.lang.String |
TAG_BASE
|
protected static java.lang.String |
TAG_BGSOUND
|
protected static java.lang.String |
TAG_EMBED
|
protected static java.lang.String |
TAG_FRAME
|
protected static java.lang.String |
TAG_IMAGE
|
protected static java.lang.String |
TAG_INPUT
|
protected static java.lang.String |
TAG_LINK
|
protected static java.lang.String |
TAG_SCRIPT
|
Constructor Summary | |
---|---|
protected |
HTMLParser()
Protected constructor to prevent instantiation except from within subclasses. |
Method Summary | |
---|---|
java.util.Iterator |
getEmbeddedResourceURLs(byte[] html,
java.net.URL baseUrl)
Get the URLs for all the resources that a browser would automatically download following the download of the HTML content, that is: images, stylesheets, javascript files, applets, etc... |
java.util.Iterator |
getEmbeddedResourceURLs(byte[] html,
java.net.URL baseUrl,
java.util.Collection coll)
Get the URLs for all the resources that a browser would automatically download following the download of the HTML content, that is: images, stylesheets, javascript files, applets, etc... |
abstract java.util.Iterator |
getEmbeddedResourceURLs(byte[] html,
java.net.URL baseUrl,
URLCollection coll)
Get the URLs for all the resources that a browser would automatically download following the download of the HTML content, that is: images, stylesheets, javascript files, applets, etc... |
static HTMLParser |
getParser()
|
static HTMLParser |
getParser(java.lang.String htmlParserClassName)
|
protected 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String ATT_BACKGROUND
protected static final java.lang.String ATT_HREF
protected static final java.lang.String ATT_REL
protected static final java.lang.String ATT_SRC
protected static final java.lang.String ATT_STYLE
protected static final java.lang.String ATT_TYPE
protected static final java.lang.String ATT_IS_IMAGE
protected static final java.lang.String TAG_APPLET
protected static final java.lang.String TAG_BASE
protected static final java.lang.String TAG_BGSOUND
protected static final java.lang.String TAG_EMBED
protected static final java.lang.String TAG_FRAME
protected static final java.lang.String TAG_IMAGE
protected static final java.lang.String TAG_INPUT
protected static final java.lang.String TAG_LINK
protected static final java.lang.String TAG_SCRIPT
protected static final java.lang.String STYLESHEET
public static final java.lang.String PARSER_CLASSNAME
public static final java.lang.String DEFAULT_PARSER
Constructor Detail |
---|
protected HTMLParser()
Method Detail |
---|
public static final HTMLParser getParser()
public static final HTMLParser getParser(java.lang.String htmlParserClassName)
public java.util.Iterator getEmbeddedResourceURLs(byte[] html, java.net.URL baseUrl) throws HTMLParseException
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.
html
- HTML codebaseUrl
- Base URL from which the HTML code was obtained
HTMLParseException
public abstract java.util.Iterator getEmbeddedResourceURLs(byte[] html, java.net.URL baseUrl, URLCollection coll) throws HTMLParseException
All URLs should be added to the Collection.
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. N.B. The Iterator returns URLs, but the Collection will contain objects of class URLString.
html
- HTML codebaseUrl
- Base URL from which the HTML code was obtainedcoll
- URLCollection
HTMLParseException
public java.util.Iterator getEmbeddedResourceURLs(byte[] html, java.net.URL baseUrl, java.util.Collection coll) throws HTMLParseException
html
- HTML codebaseUrl
- Base URL from which the HTML code was obtainedcoll
- Collection - will contain URLString objects, not URLs
HTMLParseException
protected boolean isReusable()
|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |