Package com.weather.info.service.impl
Class OpenWeatherServiceImpl
java.lang.Object
com.weather.info.service.impl.OpenWeatherServiceImpl
- All Implemented Interfaces:
OpenWeatherService
OpenWeatherServiceImpl is a concrete implementation of OpenWeatherService interface and provides the implementation
of all the methods of this interface.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCoordinatesForPincode
(long pincode) This method is responsible to fetch Geo-Spatial coordinates data by calling OpenWeather API using OpenWeatherClientgetWeatherForPincode
(PincodeEntity pincode) This method is responsible to fetch weather information by taking pincode as parameter.
-
Constructor Details
-
OpenWeatherServiceImpl
public OpenWeatherServiceImpl()
-
-
Method Details
-
getWeatherForPincode
Description copied from interface:OpenWeatherService
This method is responsible to fetch weather information by taking pincode as parameter.- Specified by:
getWeatherForPincode
in interfaceOpenWeatherService
- Parameters:
pincode
- Pincode represents the zip code for which the weather info needs to be fetched- Returns:
- weather information for a given pin code
-
getCoordinatesForPincode
Description copied from interface:OpenWeatherService
This method is responsible to fetch Geo-Spatial coordinates data by calling OpenWeather API using OpenWeatherClient- Specified by:
getCoordinatesForPincode
in interfaceOpenWeatherService
- Parameters:
pincode
- pincode represents the pincode for which the Geo-Spatial coordinates data to be fetched.- Returns:
- Geo-Spatial coordinate data which include latitude, longitude values for a given pincode
-