Class OpenWeatherServiceImpl

java.lang.Object
com.weather.info.service.impl.OpenWeatherServiceImpl
All Implemented Interfaces:
OpenWeatherService

public class OpenWeatherServiceImpl extends Object implements OpenWeatherService
OpenWeatherServiceImpl is a concrete implementation of OpenWeatherService interface and provides the implementation of all the methods of this interface.
  • Constructor Details

    • OpenWeatherServiceImpl

      public OpenWeatherServiceImpl()
  • Method Details

    • getWeatherForPincode

      public OpenWeatherResponseVO getWeatherForPincode(PincodeEntity pincode)
      Description copied from interface: OpenWeatherService
      This method is responsible to fetch weather information by taking pincode as parameter.
      Specified by:
      getWeatherForPincode in interface OpenWeatherService
      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

      public OpenWeatherCoordinatesResponseVO getCoordinatesForPincode(long pincode)
      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 interface OpenWeatherService
      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