use of joynr.vehicle.Country in project joynr by bmwcarit.
the class MyRadioProvider method getLocationOfCurrentStation.
@Override
public Promise<GetLocationOfCurrentStationDeferred> getLocationOfCurrentStation() {
Country country = currentStation.getCountry();
GeoPosition location = countryGeoPositionMap.get(country);
LOG.info(PRINT_BORDER + "getLocationOfCurrentStation: country: " + country.name() + ", location: " + location + PRINT_BORDER);
RadioProvider.GetLocationOfCurrentStationDeferred deferred = new GetLocationOfCurrentStationDeferred();
// actions that take no time can be returned immediately by resolving the deferred.
deferred.resolve(country, location);
return new Promise<RadioProvider.GetLocationOfCurrentStationDeferred>(deferred);
}
Aggregations