From a70826c63fc16069cc7ea11c3957e221e79545c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 23 May 2009 18:02:30 +0200 Subject: [PATCH] Add request listener management. --- .../pterodactylus/jsite/core/RequestManager.java | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/net/pterodactylus/jsite/core/RequestManager.java b/src/net/pterodactylus/jsite/core/RequestManager.java index 23184b9..df7028f 100644 --- a/src/net/pterodactylus/jsite/core/RequestManager.java +++ b/src/net/pterodactylus/jsite/core/RequestManager.java @@ -43,6 +43,9 @@ public class RequestManager implements NodeListener { /** The logger. */ private static final Logger logger = Logger.getLogger(RequestManager.class.getName()); + /** Request event manager. */ + private final RequestListenerManager requestListenerManager = new RequestListenerManager(); + /** The node manager. */ private final NodeManager nodeManager; @@ -60,6 +63,32 @@ public class RequestManager implements NodeListener { } // + // LISTENER MANAGEMENT + // + + /** + * Adds the given request listener to the list of registered listeners. + * + * @see RequestListenerManager#addListener(RequestListener) + * @param requestListener + * The request listener to add + */ + public void addRequestListener(RequestListener requestListener) { + requestListenerManager.addListener(requestListener); + } + + /** + * Removes the given request listener from the list of registered listeners. + * + * @see RequestListenerManager#removeListener(RequestListener) + * @param requestListener + * The request listener to remove + */ + public void removeRequestListener(RequestListener requestListener) { + requestListenerManager.removeListener(requestListener); + } + + // // ACTIONS // -- 2.7.4