event listener is now used by the xml router and the publish method of the gateway is
[xmlrouter] / listener / src / main / java / org / wamblee / xmlrouter / listener / LoggingEventListener.java
index 189f7632ae1993ef63af0b63cdba97827c5a988c..24c6be65c9333d571ab60f43e28dc291e40f0cff 100644 (file)
@@ -19,9 +19,6 @@ import java.util.List;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import javax.print.attribute.standard.Destination;
-
-import org.wamblee.xmlrouter.common.Id;
 import org.wamblee.xmlrouter.config.Transformation;
 
 /**
@@ -42,18 +39,23 @@ public class LoggingEventListener implements EventListener {
 
     @Override
     public void delivered(EventInfo aEvent, List<Transformation> aSequence,
-        Id<Destination> aDestination, String aDestinationName,
-        boolean aSuccessFlag) {
+        long aDestinationId, String aDestinationName, boolean aSuccessFlag) {
         if (LOGGER.isLoggable(level)) {
-            LOGGER.log(level, "event delivered: " + aEvent + ", sequence '" +
-                getSequenceString(aSequence) + "', destionationId " +
-                aDestination + ", destinationName '" + aDestinationName + "'");
+            LOGGER
+                .log(level, "event delivered: " + aEvent + ", sequence '" +
+                    getSequenceString(aSequence) + "', destinationId " +
+                    aDestinationId + ", destinationName '" + aDestinationName +
+                    "'");
         }
     }
 
     private String getSequenceString(List<Transformation> aSequence) {
         StringBuffer buf = new StringBuffer();
-        for (Transformation transformation : aSequence) {
+        for (int i = 0; i < aSequence.size(); i++) {
+            if (i > 0) {
+                buf.append(", ");
+            }
+            Transformation transformation = aSequence.get(i);
             buf.append(transformation.getName());
             buf.append("(");
             buf.append(transformation.getFromType());