Search in sources :

Example 1 with Country

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);
}
Also used : Promise(io.joynr.provider.Promise) Country(joynr.vehicle.Country) GeoPosition(joynr.vehicle.GeoPosition) RadioProvider(joynr.vehicle.RadioProvider)

Aggregations

Promise (io.joynr.provider.Promise)1 Country (joynr.vehicle.Country)1 GeoPosition (joynr.vehicle.GeoPosition)1 RadioProvider (joynr.vehicle.RadioProvider)1