]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.district.route/src/org/simantics/district/route/Router.java
Improved Routes view functionality
[simantics/district.git] / org.simantics.district.route / src / org / simantics / district / route / Router.java
1 package org.simantics.district.route;
2
3 import java.util.List;
4
5 import org.simantics.db.Resource;
6
7 /**
8  * @author Tuukka Lehtonen
9  */
10 public interface Router {
11
12     /**
13      * @return descriptive name of the router
14      */
15     default String name() {
16         return toString();
17     }
18
19     /**
20      * Must be invoked outside of any transaction realm, like a database request or
21      * experiment thread, preferably from a background job thread.
22      *
23      * @param config reserved for future use, may be <code>null</code>
24      * @param wayPoints waypoints for the route to find in visiting order. The
25      *            resources must represents district network diagram elements.
26      * @return the piece-wise shortest path between the specified waypoints as a
27      *         fully baked path of district network diagram element resources
28      * @throws RoutingException in case of any problems in routing
29      */
30     List<Resource> findShortestPath(RouterConfiguration config, List<Resource> wayPoints) throws RoutingException;
31
32 }