import java.util.logging.Level;
import java.util.logging.Logger;
-import javax.print.attribute.standard.Destination;
-import javax.xml.transform.dom.DOMSource;
-
-import org.wamblee.xml.XMLDocument;
-import org.wamblee.xmlrouter.common.Id;
import org.wamblee.xmlrouter.config.Transformation;
/**
}
@Override
- public void delivered(String aDocType, Id<DOMSource> aEventId,
- DOMSource aEvent, List<Transformation> aSequence,
- Id<Destination> aDestination, String aDestinationName,
- boolean aSuccessFlag) {
+ public void delivered(EventInfo aEvent, List<Transformation> aSequence,
+ String aDestinationId, boolean aSuccessFlag) {
if (LOGGER.isLoggable(level)) {
- LOGGER.log(level, "event delivered: document type '" + aDocType +
- "', eventId " + aEventId + ", event '" +
- new XMLDocument(aEvent).print(true) + "', sequence '" +
- getSequenceString(aSequence) + "', destionationId " +
- aDestination + ", destinationName '" + aDestinationName + "'");
+ LOGGER.log(level, "event delivered: " + aEvent + ", sequence '" +
+ getSequenceString(aSequence) + "', destinationId " +
+ aDestinationId + "'");
}
}
private String getSequenceString(List<Transformation> aSequence) {
StringBuffer buf = new StringBuffer();
- for (Transformation transformation : aSequence) {
- buf.append(transformation.getName());
+ for (int i = 0; i < aSequence.size(); i++) {
+ if (i > 0) {
+ buf.append(", ");
+ }
+ Transformation transformation = aSequence.get(i);
+ buf.append(transformation.getId());
buf.append("(");
buf.append(transformation.getFromType());
buf.append("->");
}
@Override
- public void notDelivered(String aDocumentType, Id<DOMSource> aEventId,
- DOMSource aEvent) {
+ public void notDelivered(EventInfo aInfo) {
if (LOGGER.isLoggable(level)) {
- LOGGER.log(level, "event not delivered: document type '" +
- aDocumentType + "', eventId " + aEventId + ", event '" +
- new XMLDocument(aEvent).print(true) + "'");
+ LOGGER.log(level, "event not delivered: " + aInfo);
}
}
}