de812335f3ae95eef865c3515d7eee83f4ea6e8c
[arachne.git] / src / net / pterodactylus / arachne / parser / ParserListener.java
1 /*
2  * © 2009 David ‘Bombe’ Roden
3  */
4 package net.pterodactylus.arachne.parser;
5
6 import java.io.InputStream;
7 import java.util.EventListener;
8
9 /**
10  * Interface for objects that need to be notified when a {@link Parser} finds
11  * indexable content.
12  *
13  * @author David ‘Bombe’ Roden <bombe@pterodactylus.net>
14  */
15 public interface ParserListener extends EventListener {
16
17         /**
18          * Notifies a listener that a title was identified in the parsed content.
19          *
20          * @param inputStream
21          *            The parsed input stream
22          * @param title
23          *            The title that was found
24          */
25         public void parsedTitle(InputStream inputStream, String title);
26
27         /**
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.
31          *
32          * @param inputStream
33          *            The parsed input stream
34          * @param link
35          *            The identified link
36          */
37         public void parsedLink(InputStream inputStream, String link);
38
39 }