geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r631613 - in /geronimo/sandbox/async-http-client-mina2/src/main/java/org/apache/ahc: AsyncHttpClient.java util/EventDispatcher.java
Date Wed, 27 Feb 2008 15:22:12 GMT
Author: rickmcguire
Date: Wed Feb 27 07:22:08 2008
New Revision: 631613

URL: http://svn.apache.org/viewvc?rev=631613&view=rev
Log:
GERONIMO-3877 AsyncHttpClient should provide a method that returns monitoring listeners


Modified:
    geronimo/sandbox/async-http-client-mina2/src/main/java/org/apache/ahc/AsyncHttpClient.java
    geronimo/sandbox/async-http-client-mina2/src/main/java/org/apache/ahc/util/EventDispatcher.java

Modified: geronimo/sandbox/async-http-client-mina2/src/main/java/org/apache/ahc/AsyncHttpClient.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/async-http-client-mina2/src/main/java/org/apache/ahc/AsyncHttpClient.java?rev=631613&r1=631612&r2=631613&view=diff
==============================================================================
--- geronimo/sandbox/async-http-client-mina2/src/main/java/org/apache/ahc/AsyncHttpClient.java
(original)
+++ geronimo/sandbox/async-http-client-mina2/src/main/java/org/apache/ahc/AsyncHttpClient.java
Wed Feb 27 07:22:08 2008
@@ -649,6 +649,14 @@
             eventDispatcher.removeListener(listener);
         }
     }
+    
+    /**
+     * Returns the list of all listeners.  May return null if no listeners have
+     * been added.
+     */
+    public MonitoringListener[] getMonitoringListeners() {
+        return eventDispatcher == null ? null : eventDispatcher.getListeners();
+    }
 
     /**
      * Send a notification event to any monitoring listeners.

Modified: geronimo/sandbox/async-http-client-mina2/src/main/java/org/apache/ahc/util/EventDispatcher.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/async-http-client-mina2/src/main/java/org/apache/ahc/util/EventDispatcher.java?rev=631613&r1=631612&r2=631613&view=diff
==============================================================================
--- geronimo/sandbox/async-http-client-mina2/src/main/java/org/apache/ahc/util/EventDispatcher.java
(original)
+++ geronimo/sandbox/async-http-client-mina2/src/main/java/org/apache/ahc/util/EventDispatcher.java
Wed Feb 27 07:22:08 2008
@@ -68,6 +68,13 @@
     }
     
     /**
+     * Returns an array of the current monitoring listeners.
+     */
+    public MonitoringListener[] getListeners() {
+        return listeners.toArray(new MonitoringListener[0]);
+    }
+    
+    /**
      * Dispatch an event.  
      * 
      * @param event     The event to dispatch.



Mime
View raw message