public class PredictionsServer extends AbstractServer implements PredictionsInterface
PredictionsInterface.RouteStop| Modifier and Type | Method and Description |
|---|---|
java.util.List<IpcPredictionsForRouteStopDest> |
get(java.util.List<PredictionsInterface.RouteStop> routeStops,
int predictionsPerStop)
For each route/stop specified returns a list of predictions for that
stop.
|
java.util.List<IpcPredictionsForRouteStopDest> |
get(Location loc,
double maxDistance,
int predictionsPerStop)
Returns predictions based on the specified location.
|
java.util.List<IpcPredictionsForRouteStopDest> |
get(java.lang.String routeIdOrShortName,
java.lang.String stopId,
int predictionsPerStop)
Returns list of current predictions for the specified route/stop.
|
java.util.List<IpcPredictionsForRouteStopDest> |
getAllPredictions(int predictionMaxFutureSecs)
Returns all predictions.
|
static PredictionsServer |
start(java.lang.String agencyId,
PredictionDataCache predictionDataCache)
Starts up the PredictionsServer so that RMI calls can query for
predictions.
|
getAgencyId, getBindName, isConstructedpublic static PredictionsServer start(java.lang.String agencyId, PredictionDataCache predictionDataCache)
agencyId - predictionDataCache - public java.util.List<IpcPredictionsForRouteStopDest> get(java.lang.String routeIdOrShortName, java.lang.String stopId, int predictionsPerStop) throws java.rmi.RemoteException
PredictionsInterfaceget in interface PredictionsInterfacepredictionsPerStop - Max number of predictions to return for route/stopjava.rmi.RemoteExceptionpublic java.util.List<IpcPredictionsForRouteStopDest> get(java.util.List<PredictionsInterface.RouteStop> routeStops, int predictionsPerStop) throws java.rmi.RemoteException
PredictionsInterfaceget in interface PredictionsInterfacerouteStops - List of route/stops to return predictions for. Uses route
short name or route IDpredictionsPerStop - Max number of predictions to return per route/stopjava.rmi.RemoteExceptionpublic java.util.List<IpcPredictionsForRouteStopDest> getAllPredictions(int predictionMaxFutureSecs)
PredictionsInterfacegetAllPredictions in interface PredictionsInterfacepublic java.util.List<IpcPredictionsForRouteStopDest> get(Location loc, double maxDistance, int predictionsPerStop) throws java.rmi.RemoteException
PredictionsInterfaceget in interface PredictionsInterfaceloc - The user's locationmaxDistance - How far a stop can be away from the locjava.rmi.RemoteException