From: David ‘Bombe’ Roden Date: Sat, 23 May 2009 16:02:30 +0000 (+0200) Subject: Add request listener management. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=a70826c63fc16069cc7ea11c3957e221e79545c4;p=jSite2.git Add request listener management. --- 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 //