0ab6acbb87ec34a4bbf561426bd3374483cd9611
[jSite2.git] / src / net / pterodactylus / jsite / core / InsertListener.java
1 /*
2  * jSite2 - InsertListener.java - Copyright © 2008 David Roden
3  * 
4  * This program is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU General Public License as published by the Free Software
6  * Foundation; either version 2 of the License, or (at your option) any later
7  * version.
8  * 
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12  * details.
13  * 
14  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16  * Place - Suite 330, Boston, MA 02111-1307, USA.
17  */
18 package net.pterodactylus.jsite.core;
19
20 import java.util.EventListener;
21
22 /**
23  * Interface for objects that want to be notified on events emitted by the
24  * {@link InsertManager}.
25  * 
26  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
27  */
28 public interface InsertListener extends EventListener {
29
30         /**
31          * Notifies a listener that an insert was added.
32          * 
33          * @param insert
34          *            The insert that was added
35          */
36         public void insertAdded(Insert insert);
37
38         /**
39          * Notifies a listener that an insert was removed.
40          * 
41          * @param insert
42          *            The insert that was removed
43          */
44         public void insertRemoved(Insert insert);
45
46         /**
47          * Notifies a listener that an insert was started.
48          * 
49          * @param insert
50          *            The insert that was started
51          */
52         public void insertStarted(Insert insert);
53
54         /**
55          * Notifies a listener that an insert made some progress.
56          * 
57          * @param insert
58          *            The insert that made some progress
59          */
60         public void insertProgressed(Insert insert);
61
62         /**
63          * Notifies listeners that an insert generated a URI.
64          * 
65          * @param insert
66          *            The insert that generated a URI
67          * @param uri
68          *            The generated URI
69          */
70         public void insertGeneratedURI(Insert insert, String uri);
71
72         /**
73          * Notifies a listener that an insert has finished.
74          * 
75          * @param insert
76          *            The insert that has finished
77          */
78         public void insertFinished(Insert insert);
79
80 }