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, isConstructed
public 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
PredictionsInterface
get
in interface PredictionsInterface
predictionsPerStop
- Max number of predictions to return for route/stopjava.rmi.RemoteException
public java.util.List<IpcPredictionsForRouteStopDest> get(java.util.List<PredictionsInterface.RouteStop> routeStops, int predictionsPerStop) throws java.rmi.RemoteException
PredictionsInterface
get
in interface PredictionsInterface
routeStops
- 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.RemoteException
public java.util.List<IpcPredictionsForRouteStopDest> getAllPredictions(int predictionMaxFutureSecs)
PredictionsInterface
getAllPredictions
in interface PredictionsInterface
public java.util.List<IpcPredictionsForRouteStopDest> get(Location loc, double maxDistance, int predictionsPerStop) throws java.rmi.RemoteException
PredictionsInterface
get
in interface PredictionsInterface
loc
- The user's locationmaxDistance
- How far a stop can be away from the locjava.rmi.RemoteException