renamed logger to listener
authorErik Brakkee <erik@brakkee.org>
Sun, 24 Jul 2011 17:56:58 +0000 (19:56 +0200)
committerErik Brakkee <erik@brakkee.org>
Sun, 24 Jul 2011 17:56:58 +0000 (19:56 +0200)
impl/pom.xml
listener/pom.xml [moved from logging/pom.xml with 94% similarity]
listener/src/main/java/org/wamblee/xmlrouter/listener/CompositeEventListener.java [moved from logging/src/main/java/org/wamblee/xmlrouter/logging/CompositeEventLogger.java with 80% similarity]
listener/src/main/java/org/wamblee/xmlrouter/listener/EventListener.java [moved from logging/src/main/java/org/wamblee/xmlrouter/logging/EventLogger.java with 96% similarity]
listener/src/main/java/org/wamblee/xmlrouter/listener/LoggingEventListener.java [moved from logging/src/main/java/org/wamblee/xmlrouter/logging/LoggingEventLogger.java with 92% similarity]
pom.xml

index 8d5ec97f5961eb4cb2c38bc7db69c10cd893dd1c..0947b943ac2a00537135892e33bd0171d44d55e4 100644 (file)
@@ -31,7 +31,7 @@
         </dependency>
         <dependency>
             <groupId>org.wamblee.xmlrouter</groupId>
-            <artifactId>xmlrouter-logging</artifactId>
+            <artifactId>xmlrouter-listener</artifactId>
             <version>0.1-SNAPSHOT</version>
         </dependency>
         <dependency>
similarity index 94%
rename from logging/pom.xml
rename to listener/pom.xml
index cce73f5fbb7b4e9158260aad495b98219531cf54..917d4ec557f65dc3674c895268c54527ba8100a2 100644 (file)
@@ -8,9 +8,9 @@
     </parent>
 
     <modelVersion>4.0.0</modelVersion>
-    <artifactId>xmlrouter-logging</artifactId>
+    <artifactId>xmlrouter-listener</artifactId>
     <packaging>jar</packaging>
-    <name>/xmlrouter/logging</name>
+    <name>/xmlrouter/listener</name>
     <url>http://wamblee.org</url>
     
     <dependencies>
similarity index 80%
rename from logging/src/main/java/org/wamblee/xmlrouter/logging/CompositeEventLogger.java
rename to listener/src/main/java/org/wamblee/xmlrouter/listener/CompositeEventListener.java
index b30d6205d70bf3e4d368a39b0b4d4a7b424a1089..be6c92a06bd07397dde310e11ff65d6d3e334503 100644 (file)
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.wamblee.xmlrouter.logging;
+package org.wamblee.xmlrouter.listener;
 
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -29,14 +29,14 @@ import org.wamblee.concurrency.WriteLock;
 import org.wamblee.xmlrouter.common.Id;
 import org.wamblee.xmlrouter.config.Transformation;
 
-public class CompositeEventLogger implements EventLogger {
+public class CompositeEventListener implements EventListener {
 
     private static final Logger LOGGER = Logger
-        .getLogger(CompositeEventLogger.class.getName());
-    private List<EventLogger> loggers;
+        .getLogger(CompositeEventListener.class.getName());
+    private List<EventListener> loggers;
 
-    public CompositeEventLogger() {
-        loggers = new ArrayList<EventLogger>();
+    public CompositeEventListener() {
+        loggers = new ArrayList<EventListener>();
     }
 
     /**
@@ -46,7 +46,7 @@ public class CompositeEventLogger implements EventLogger {
      *            Logger
      */
     @WriteLock
-    public void addLogger(EventLogger aLogger) {
+    public void addLogger(EventListener aLogger) {
         loggers.add(aLogger);
     }
 
@@ -58,10 +58,10 @@ public class CompositeEventLogger implements EventLogger {
      * @return True iff the logger was removed.
      */
     @WriteLock
-    public boolean removeLogger(EventLogger aLogger) {
-        Iterator<EventLogger> logger = loggers.iterator();
+    public boolean removeLogger(EventListener aLogger) {
+        Iterator<EventListener> logger = loggers.iterator();
         while (logger.hasNext()) {
-            EventLogger value = logger.next();
+            EventListener value = logger.next();
             if (value == aLogger) {
                 logger.remove();
                 return true;
@@ -76,7 +76,7 @@ public class CompositeEventLogger implements EventLogger {
         DOMSource aEvent, List<Transformation> aSequence,
         Id<Destination> aDestination, String aDestinationName,
         boolean aSuccessFlag) {
-        for (EventLogger logger : loggers) {
+        for (EventListener logger : loggers) {
             try {
                 logger.delivered(aDocumentType, aEventId, aEvent, aSequence,
                     aDestination, aDestinationName, aSuccessFlag);
@@ -90,7 +90,7 @@ public class CompositeEventLogger implements EventLogger {
     @ReadLock
     public void notDelivered(String aDocumentType, Id<DOMSource> aEventId,
         DOMSource aEvent) {
-        for (EventLogger logger : loggers) {
+        for (EventListener logger : loggers) {
             try {
                 logger.notDelivered(aDocumentType, aEventId, aEvent);
             } catch (Exception e) {
similarity index 96%
rename from logging/src/main/java/org/wamblee/xmlrouter/logging/EventLogger.java
rename to listener/src/main/java/org/wamblee/xmlrouter/listener/EventListener.java
index 3c6e32598d4543a10d4484746961d5da4addf3e0..a7a5b5a97b592d4edec19bbdc18204e589310fbd 100644 (file)
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.wamblee.xmlrouter.logging;
+package org.wamblee.xmlrouter.listener;
 
 import java.util.List;
 
@@ -29,7 +29,7 @@ import org.wamblee.xmlrouter.config.Transformation;
  * @author Erik Brakkee
  * 
  */
-public interface EventLogger {
+public interface EventListener {
 
     /**
      * Called when an event is delivered to a destination.
similarity index 92%
rename from logging/src/main/java/org/wamblee/xmlrouter/logging/LoggingEventLogger.java
rename to listener/src/main/java/org/wamblee/xmlrouter/listener/LoggingEventListener.java
index 01c261c9e78de93e2307feb90dbc48cbbdbc6fbe..f623b135bb28787abf865bbc8f3c3278a5f2c868 100644 (file)
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.wamblee.xmlrouter.logging;
+package org.wamblee.xmlrouter.listener;
 
 import java.util.List;
 import java.util.logging.Level;
@@ -32,13 +32,13 @@ import org.wamblee.xmlrouter.config.Transformation;
  * @author Erik Brakkee
  * 
  */
-public class LoggingEventLogger implements EventLogger {
+public class LoggingEventListener implements EventListener {
     private static final Logger LOGGER = Logger
-        .getLogger(LoggingEventLogger.class.getName());
+        .getLogger(LoggingEventListener.class.getName());
 
     private Level level;
 
-    public LoggingEventLogger(Level aLevel) {
+    public LoggingEventListener(Level aLevel) {
         level = aLevel;
     }
 
diff --git a/pom.xml b/pom.xml
index e8f84fe524877341697b8bbe7013500784ae0db8..cfa3d354d619e5509f21d479d92b6dffa81ec025 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -41,7 +41,7 @@
         <module>publish</module>
         <module>subscribe</module>
         <module>impl</module>
-        <module>logging</module>
+        <module>listener</module>
     </modules>
 
     <!-- need to exclude test at release because test depends on an artifact