X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=logging%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fxmlrouter%2Flogging%2FEventLogger.java;fp=logging%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fxmlrouter%2Flogging%2FEventLogger.java;h=3c6e32598d4543a10d4484746961d5da4addf3e0;hb=4eb3ae080f5ab01420b9fdb5980165fdcf6bf8e4;hp=0000000000000000000000000000000000000000;hpb=6be56b4078347010c95fc46c357df1600b8b3bfa;p=xmlrouter diff --git a/logging/src/main/java/org/wamblee/xmlrouter/logging/EventLogger.java b/logging/src/main/java/org/wamblee/xmlrouter/logging/EventLogger.java new file mode 100644 index 0000000..3c6e325 --- /dev/null +++ b/logging/src/main/java/org/wamblee/xmlrouter/logging/EventLogger.java @@ -0,0 +1,67 @@ +/* + * Copyright 2005-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.wamblee.xmlrouter.logging; + +import java.util.List; + +import javax.print.attribute.standard.Destination; +import javax.xml.transform.dom.DOMSource; + +import org.wamblee.xmlrouter.common.Id; +import org.wamblee.xmlrouter.config.Transformation; + +/** + * Event logger which is notified of the activities done by the xml router. + * + * @author Erik Brakkee + * + */ +public interface EventLogger { + + /** + * Called when an event is delivered to a destination. + * + * @param aDocumentType + * Document type. + * @param aEventId + * Unique id for the original event. + * @param aEvent + * The event. + * @param aSequence + * Sequence of transformations performed. + * @param aDestination + * Id of the destination the event was delivered to. + * @param aDestinationName + * Destination name. + * @param aSuccessFlag + * Whether or not event delivery succeeded. + */ + void delivered(String aDocumentType, Id aEventId, + DOMSource aEvent, List aSequence, + Id aDestination, String aDestinationName, + boolean aSuccessFlag); + + /** + * Called when an event could not be delivered to any destination. + * + * @param aEventId + * Unique id for the original event. + * @param aEvent + * Event. + */ + void notDelivered(String aDocumentType, Id aEventId, + DOMSource aEvent); +}