cs132.webPage
Class ListCallback

java.lang.Object
  extended by cs132.webPage.ListCallback
All Implemented Interfaces:
Callback

public class ListCallback
extends java.lang.Object
implements Callback

This is a callback that collects the URLs found and returns them in a list.


Constructor Summary
ListCallback()
           
 
Method Summary
 void foundHRef(java.net.URL found, java.net.URL in)
          This method is invoked by software examining a web page each time an HRef is found within the contents of the web page.
 java.util.List<java.net.URL> getURLs()
          Return list of URLs for which the callback has been invoked.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListCallback

public ListCallback()
Method Detail

foundHRef

public void foundHRef(java.net.URL found,
                      java.net.URL in)
Description copied from interface: Callback
This method is invoked by software examining a web page each time an HRef is found within the contents of the web page.

Specified by:
foundHRef in interface Callback
Parameters:
found - - the URL that was found in the contents of a web page
in - - the URL of the web page in which this HRef was found

getURLs

public java.util.List<java.net.URL> getURLs()
Return list of URLs for which the callback has been invoked.

Returns:
URLs found so far


Web Accessibility