import org.wamblee.general.Clock;
import org.wamblee.xml.XMLDocument;
import org.wamblee.xmlrouter.common.Id;
-import org.wamblee.xmlrouter.config.Config;
import org.wamblee.xmlrouter.config.DocumentType;
import org.wamblee.xmlrouter.config.Filter;
-import org.wamblee.xmlrouter.config.RouterConfig;
import org.wamblee.xmlrouter.config.Transformation;
import org.wamblee.xmlrouter.listener.EventInfo;
import org.wamblee.xmlrouter.listener.EventListener;
* @author Erik Brakkee
*
*/
-public class XMLRouter implements RouterConfig, Gateway, DestinationRegistry {
+public class XMLRouter implements Gateway, DestinationRegistry {
private static final Logger LOGGER = Logger.getLogger(XMLRouter.class
.getName());
private Map<Id<Destination>, Destination> destinations;
- public XMLRouter(Clock aClock, EventListener aListener) {
+ public XMLRouter(Clock aClock, ExtendedRouterConfig aRouterConfig,
+ EventListener aListener) {
sequenceNumbers = new AtomicLong(1);
listener = aListener;
clock = aClock;
nextEventId = new AtomicLong(clock.currentTimeMillis());
- routerConfig = new SingleRouterConfig(sequenceNumbers);
+ routerConfig = aRouterConfig;
transformations = new TransformationPaths();
destinations = new LinkedHashMap<Id<Destination>, Destination>();
}
- @Override
- public Config<DocumentType> documentTypeConfig() {
- return routerConfig.documentTypeConfig();
- }
-
- @Override
- public Config<Transformation> transformationConfig() {
- return routerConfig.transformationConfig();
- }
-
- @Override
- public Config<Filter> filterConfig() {
- return routerConfig.filterConfig();
- }
-
@Override
public void publish(String aSource, DOMSource aEvent) {
long time = clock.currentTimeMillis();