use of org.opentripplanner.routing.services.AlertPatchService in project OpenTripPlanner by opentripplanner.
the class GtfsRealtimeAlertsUpdater method configurePolling.
@Override
protected void configurePolling(Graph graph, JsonNode config) throws Exception {
// TODO: add options to choose different patch services
AlertPatchService alertPatchService = new AlertPatchServiceImpl(graph);
this.alertPatchService = alertPatchService;
String url = config.path("url").asText();
if (url == null) {
throw new IllegalArgumentException("Missing mandatory 'url' parameter");
}
this.url = url;
this.earlyStart = config.path("earlyStartSec").asInt(0);
this.feedId = config.path("feedId").asText();
if (config.path("fuzzyTripMatching").asBoolean(false)) {
this.fuzzyTripMatcher = new GtfsRealtimeFuzzyTripMatcher(graph.index);
}
LOG.info("Creating real-time alert updater running every {} seconds : {}", frequencySec, url);
}
Aggregations