From fdc1e06b2b99816e68d8fe3e8a8f823d38ee31e6 Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Sun, 24 Jul 2011 19:56:58 +0200 Subject: [PATCH] renamed logger to listener --- impl/pom.xml | 2 +- {logging => listener}/pom.xml | 4 ++-- .../listener/CompositeEventListener.java | 24 +++++++++---------- .../xmlrouter/listener/EventListener.java | 4 ++-- .../listener/LoggingEventListener.java | 8 +++---- pom.xml | 2 +- 6 files changed, 22 insertions(+), 22 deletions(-) rename {logging => listener}/pom.xml (94%) rename logging/src/main/java/org/wamblee/xmlrouter/logging/CompositeEventLogger.java => listener/src/main/java/org/wamblee/xmlrouter/listener/CompositeEventListener.java (80%) rename logging/src/main/java/org/wamblee/xmlrouter/logging/EventLogger.java => listener/src/main/java/org/wamblee/xmlrouter/listener/EventListener.java (96%) rename logging/src/main/java/org/wamblee/xmlrouter/logging/LoggingEventLogger.java => listener/src/main/java/org/wamblee/xmlrouter/listener/LoggingEventListener.java (92%) diff --git a/impl/pom.xml b/impl/pom.xml index 8d5ec97..0947b94 100644 --- a/impl/pom.xml +++ b/impl/pom.xml @@ -31,7 +31,7 @@ org.wamblee.xmlrouter - xmlrouter-logging + xmlrouter-listener 0.1-SNAPSHOT diff --git a/logging/pom.xml b/listener/pom.xml similarity index 94% rename from logging/pom.xml rename to listener/pom.xml index cce73f5..917d4ec 100644 --- a/logging/pom.xml +++ b/listener/pom.xml @@ -8,9 +8,9 @@ 4.0.0 - xmlrouter-logging + xmlrouter-listener jar - /xmlrouter/logging + /xmlrouter/listener http://wamblee.org diff --git a/logging/src/main/java/org/wamblee/xmlrouter/logging/CompositeEventLogger.java b/listener/src/main/java/org/wamblee/xmlrouter/listener/CompositeEventListener.java 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 b30d620..be6c92a 100644 --- a/logging/src/main/java/org/wamblee/xmlrouter/logging/CompositeEventLogger.java +++ b/listener/src/main/java/org/wamblee/xmlrouter/listener/CompositeEventListener.java @@ -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 loggers; + .getLogger(CompositeEventListener.class.getName()); + private List loggers; - public CompositeEventLogger() { - loggers = new ArrayList(); + public CompositeEventListener() { + loggers = new ArrayList(); } /** @@ -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 logger = loggers.iterator(); + public boolean removeLogger(EventListener aLogger) { + Iterator 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 aSequence, Id 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 aEventId, DOMSource aEvent) { - for (EventLogger logger : loggers) { + for (EventListener logger : loggers) { try { logger.notDelivered(aDocumentType, aEventId, aEvent); } catch (Exception e) { diff --git a/logging/src/main/java/org/wamblee/xmlrouter/logging/EventLogger.java b/listener/src/main/java/org/wamblee/xmlrouter/listener/EventListener.java 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 3c6e325..a7a5b5a 100644 --- a/logging/src/main/java/org/wamblee/xmlrouter/logging/EventLogger.java +++ b/listener/src/main/java/org/wamblee/xmlrouter/listener/EventListener.java @@ -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. diff --git a/logging/src/main/java/org/wamblee/xmlrouter/logging/LoggingEventLogger.java b/listener/src/main/java/org/wamblee/xmlrouter/listener/LoggingEventListener.java 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 01c261c..f623b13 100644 --- a/logging/src/main/java/org/wamblee/xmlrouter/logging/LoggingEventLogger.java +++ b/listener/src/main/java/org/wamblee/xmlrouter/listener/LoggingEventListener.java @@ -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 e8f84fe..cfa3d35 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ publish subscribe impl - logging + listener