Search in sources :

Example 1 with GraphUpdaterManager

use of org.opentripplanner.updater.GraphUpdaterManager in project OpenTripPlanner by opentripplanner.

the class UpdaterStatusResource method getUpdaters.

/**
 * Return status for a specific updater.
 */
@GET
@Path("/{updaterId}")
public Response getUpdaters(@PathParam("updaterId") int updaterId) {
    GraphUpdaterManager updaterManager = router.graph.updaterManager;
    if (updaterManager == null) {
        return Response.status(Response.Status.NOT_FOUND).entity("No updaters running.").build();
    }
    GraphUpdater updater = updaterManager.getUpdater(updaterId);
    if (updater == null) {
        return Response.status(Response.Status.NOT_FOUND).entity("No updater with that ID.").build();
    }
    return Response.status(Response.Status.OK).entity(updater.getClass()).build();
}
Also used : GraphUpdater(org.opentripplanner.updater.GraphUpdater) GraphUpdaterManager(org.opentripplanner.updater.GraphUpdaterManager)

Aggregations

GraphUpdater (org.opentripplanner.updater.GraphUpdater)1 GraphUpdaterManager (org.opentripplanner.updater.GraphUpdaterManager)1