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();
}
Aggregations