*/
package org.wamblee.xmlrouter.impl;
+import org.wamblee.general.Pair;
+
/**
* The XML Router configuration contains both configuration data as well as
* derived data used by the XML router. It is important that all this data is
public interface XMLRouterConfiguration {
/**
- * To be called before the configuration is used. Corresponds to read lock
- * acquire.
- */
- void startPublishEvent();
-
- /**
- * @return Configuration data. {@link #startPublishEvent()} must have been
- * called before doing this.
- */
- ExtendedRouterConfig getRouterConfig();
-
- /**
- * @return Transformation paths (derived data).
- */
- TransformationPaths getTransformations();
-
- /**
- * To be called after the configuration is used. Corresponds to read lock
- * release.
+ * Atomically get the configuration. The XMLRouter uses this to get a
+ * snapshot of the configuration data for handling a single message. In this
+ * way a consistent configuration is used for each event.
+ *
+ * @return Configuration.
*/
- void endPublishEvent();
+ Pair<ExtendedRouterConfig, TransformationPaths> getConfig();
/**
* Atomically sets the configuration and updates derived data. There will be