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