2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.onebusaway.internal.handler;
15 import java.util.List;
18 * The {@link RouteDataListener} is the interface used for the stop (a bridge) to communicate information about route
21 * @author Shawn Wilsher - Initial contribution
23 interface RouteDataListener {
25 * @return The routeId for this listener. {@link #onNewRouteData(List)} should only receive updates for
31 * Called when new arrival and departure data is available for this listeners route (as specified by
32 * {@link #getRouteId()}).
34 * @param lastUpdateTime a {@link long} representing the time the data was last updated.
35 * @param data a {@link List} of data from the OneBusAway API.
37 void onNewRouteData(long lastUpdateTime, List<ObaStopArrivalResponse.ArrivalAndDeparture> data);