2 * © 2009 David ‘Bombe’ Roden
4 package net.pterodactylus.arachne.parser;
6 import java.io.InputStream;
7 import java.util.EventListener;
10 * Interface for objects that need to be notified when a {@link Parser} finds
13 * @author David ‘Bombe’ Roden <bombe@pterodactylus.net>
15 public interface ParserListener extends EventListener {
18 * Notifies a listener that a title was identified in the parsed content.
21 * The parsed input stream
23 * The title that was found
25 public void parsedTitle(InputStream inputStream, String title);
28 * Notifies a listener that a link to a (maybe) different document was
29 * identified in the parsed content. The link may be in absolute or relative
30 * (to the URL of the streamed content) form.
33 * The parsed input stream
35 * The target URL of the link
37 * The title attribute of the link
39 * The text of the link
41 public void parsedLink(InputStream inputStream, String linkTarget, String linkTitle, String linkText);