|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ca.intelliware.amakihi.actor.http.VirtualBrowser
This class acts like a browser of web content.
Constructor Summary | |
VirtualBrowser()
|
|
VirtualBrowser(HttpClient client)
|
Method Summary | |
void |
addHeader(java.lang.String name,
java.lang.String value)
|
protected NameValuePair |
createCookieHeader(java.net.URL url)
|
protected Anchor |
findAnchor(org.w3c.dom.Element input)
Find the anchor element that corresponds to the input anchor. |
protected Form |
findForm(org.w3c.dom.Element input)
|
int |
followLink(org.w3c.dom.Element element)
|
protected int |
followLink(java.net.URL url,
java.lang.String referrer)
|
protected int |
get(java.lang.String urlAsString)
|
boolean |
getCoarseGrainedPerformanceMeasure()
|
Window |
getCurrentWindow()
|
boolean |
getDownloadResources()
Gets a flag indicating whether or not the external resources should be downloaded. |
protected NameValuePair[] |
getHeaders(java.net.URL url,
NameValuePair[] pairs)
Generate HTTP headers. |
java.lang.String |
getTagName()
Gets the tagName |
protected static ca.intelliware.amakihi.actor.http.VirtualBrowser.Result |
isMatchOnAttributes(org.w3c.dom.Element inputElement,
org.w3c.dom.Element potentialMatch,
java.lang.String attributeName)
|
int |
open(java.lang.String urlAsString)
|
protected int |
processResponse(java.net.URL url,
Response response)
|
protected void |
removeWindow(Window window)
|
protected void |
saveCookies(java.net.URL url,
Response response)
|
protected Response |
send(java.net.URL url,
Request.Method method,
NameValuePair[] parameters,
NameValuePair[] additionalHeaders)
|
void |
setCoarseGrainedPerformanceMeasure(boolean coarse)
|
void |
setDownloadResources(boolean downloadResources)
Sets the downloadResources |
void |
setTagName(java.lang.String tagName)
|
int |
submitForm(org.w3c.dom.Element element)
|
protected int |
submitForm(Form form,
org.w3c.dom.Element element)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public VirtualBrowser()
public VirtualBrowser(HttpClient client)
Method Detail |
protected Form findForm(org.w3c.dom.Element input) throws org.xml.sax.SAXException, java.io.IOException
protected Anchor findAnchor(org.w3c.dom.Element input) throws java.io.IOException, org.xml.sax.SAXException
Find the anchor element that corresponds to the input anchor.
public int submitForm(org.w3c.dom.Element element) throws java.io.IOException, org.xml.sax.SAXException
submitForm
in interface Browser
protected int submitForm(Form form, org.w3c.dom.Element element) throws java.io.IOException
public int followLink(org.w3c.dom.Element element) throws java.io.IOException, org.xml.sax.SAXException
followLink
in interface Browser
protected int followLink(java.net.URL url, java.lang.String referrer) throws java.io.IOException
protected static ca.intelliware.amakihi.actor.http.VirtualBrowser.Result isMatchOnAttributes(org.w3c.dom.Element inputElement, org.w3c.dom.Element potentialMatch, java.lang.String attributeName)
public void addHeader(java.lang.String name, java.lang.String value)
addHeader
in interface Browser
public int open(java.lang.String urlAsString) throws java.io.IOException
open
in interface Browser
protected int get(java.lang.String urlAsString) throws java.io.IOException
protected int processResponse(java.net.URL url, Response response) throws java.io.IOException
protected Response send(java.net.URL url, Request.Method method, NameValuePair[] parameters, NameValuePair[] additionalHeaders) throws java.io.IOException
protected void saveCookies(java.net.URL url, Response response)
protected NameValuePair[] getHeaders(java.net.URL url, NameValuePair[] pairs)
Generate HTTP headers.
protected NameValuePair createCookieHeader(java.net.URL url)
public void setTagName(java.lang.String tagName)
setTagName
in interface Browser
Browser.setTagName(String)
public java.lang.String getTagName()
public boolean getDownloadResources()
public void setDownloadResources(boolean downloadResources)
downloadResources
- The downloadResources to setprotected void removeWindow(Window window)
public Window getCurrentWindow()
getCurrentWindow
in interface Browser
public void setCoarseGrainedPerformanceMeasure(boolean coarse)
public boolean getCoarseGrainedPerformanceMeasure()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |