opentripplanner/OpenTripPlanner — pull request #1641 by laurentg (2014-12-02 10:02:24+00:00)
Title: Encapsulate routers, #1520

This should handle #1520.

- Remove most of the references to GraphService from various parts. Replace them by a direct access to the Router or the Graph. Some services now are split with one instance per graph (PathService, IsochroneService, PlanGenerator...)
- To get the appropriate Router instance in various API methods, we use the method getRouter(String routerId) of the injected OTPServer instance singleton.
- The Router is stored as a "service" inside the Graph, to help solve the ownership issue and make the Router/Graph memory reclaimable when graph is auto-reloaded in pre-evict mode.

Now with this change, some services belongs to Router, some other to Graph. If needed we could reshuffle them (either moving services from Graph to Router or the other way around).