* 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;
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>();
}
/**
* Logger
*/
@WriteLock
- public void addLogger(EventLogger aLogger) {
+ public void addLogger(EventListener aLogger) {
loggers.add(aLogger);
}
* @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;
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);
@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) {
* 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;
* @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;
}