Add request listener management.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 23 May 2009 16:02:30 +0000 (18:02 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 23 May 2009 16:02:30 +0000 (18:02 +0200)
src/net/pterodactylus/jsite/core/RequestManager.java

index 23184b9..df7028f 100644 (file)
@@ -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
        //