- private Map<Integer, Filter> filters;
- private Map<Integer, Destination> destinations;
-
- public XMLRouter() {
- sequenceNumbers = new AtomicInteger(1);
- documentTypes = new LinkedHashMap<Integer, DocumentType>();
+ private Map<Long, Filter> filters;
+ private Map<Long, Destination> destinations;
+
+ public XMLRouter(Clock aClock, EventListener aListener) {
+ listener = aListener;
+ clock = aClock;
+ nextEventId = new AtomicLong(clock.currentTimeMillis());
+ sequenceNumbers = new AtomicLong(1);
+ documentTypes = new LinkedHashMap<Long, DocumentType>();