Class WeatherConfiguration
java.lang.Object
org.apache.camel.component.weather.WeatherConfiguration
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAppid()
getCnt()
org.apache.hc.client5.http.impl.classic.CloseableHttpClient
getIds()
getLat()
getLon()
getMode()
getName()
getUnits()
getZip()
getZoom()
void
APPID ID used to authenticate the user connected to the API Servervoid
Number of results to be foundvoid
setGeolocationAccessKey
(String geolocationAccessKey) The geolocation service now needs an accessKey to be usedvoid
setGeoLocationProvider
(GeoLocationProvider geoLocationProvider) A custum geolocation provider to determine the longitude and latitude to use when no location information is set.void
setGeolocationRequestHostIP
(String geolocationRequestHostIP) The geolocation service now needs to specify the IP associated to the accessKey you're usingvoid
setHeaderName
(String headerName) To store the weather result in this header instead of the message body.void
setHttpClient
(org.apache.hc.client5.http.impl.classic.CloseableHttpClient httpClient) To use an existing configured http client (for example with http proxy)void
List of id's of city/stations.void
void
setLanguage
(WeatherLanguage language) Language of the response.void
Latitude of location.void
setLocation
(String location) If null Camel will try and determine your current location using the geolocation of your ip address, else specify the city,country.void
Longitude of location.void
setMode
(WeatherMode mode) The output format of the weather data.void
void
If null, the current weather will be returned, else use values of 5, 7, 14 days.void
setRightLon
(String rightLon) For boxed queries this is the right longtitude.void
For boxed queries this is the top latitude.void
setUnits
(WeatherUnits units) The units for temperature measurement.void
setWeatherApi
(WeatherApi weatherApi) The API to use (current, forecast/3 hour, forecast daily, station)void
Zip-code, e.g.void
For boxed queries this is the zoom.
-
Constructor Details
-
WeatherConfiguration
public WeatherConfiguration()
-
-
Method Details
-
getPeriod
-
setPeriod
If null, the current weather will be returned, else use values of 5, 7, 14 days. Only the numeric value for the forecast period is actually parsed, so spelling, capitalisation of the time period is up to you (its ignored) -
getName
-
setName
-
getMode
-
setMode
The output format of the weather data. -
getUnits
-
setUnits
The units for temperature measurement. -
getLocation
-
setLocation
If null Camel will try and determine your current location using the geolocation of your ip address, else specify the city,country. For well known city names, Open Weather Map will determine the best fit, but multiple results may be returned. Hence specifying and country as well will return more accurate data. If you specify "current" as the location then the component will try to get the current latitude and longitude and use that to get the weather details. You can use lat and lon options instead of location. -
getHeaderName
-
setHeaderName
To store the weather result in this header instead of the message body. This is useable if you want to keep current message body as-is. -
getLat
-
setLat
Latitude of location. You can use lat and lon options instead of location. For boxed queries this is the bottom latitude. -
getLon
-
setLon
Longitude of location. You can use lat and lon options instead of location. For boxed queries this is the left longtitude. -
setAppid
APPID ID used to authenticate the user connected to the API Server -
getAppid
-
getLanguage
-
setLanguage
Language of the response. -
getRightLon
-
setRightLon
For boxed queries this is the right longtitude. Needs to be used in combination with topLat and zoom. -
getTopLat
-
setTopLat
For boxed queries this is the top latitude. Needs to be used in combination with rightLon and zoom. -
getZoom
-
setZoom
For boxed queries this is the zoom. Needs to be used in combination with rightLon and topLat. -
getZip
-
setZip
Zip-code, e.g. 94040,us -
getIds
-
setIds
List of id's of city/stations. You can separate multiple ids by comma. -
setIds
-
getCnt
-
setCnt
Number of results to be found -
getWeatherApi
-
setWeatherApi
The API to use (current, forecast/3 hour, forecast daily, station) -
getGeolocationAccessKey
-
setGeolocationAccessKey
The geolocation service now needs an accessKey to be used -
getGeolocationRequestHostIP
-
setGeolocationRequestHostIP
The geolocation service now needs to specify the IP associated to the accessKey you're using -
getHttpClient
public org.apache.hc.client5.http.impl.classic.CloseableHttpClient getHttpClient() -
setHttpClient
public void setHttpClient(org.apache.hc.client5.http.impl.classic.CloseableHttpClient httpClient) To use an existing configured http client (for example with http proxy) -
getGeoLocationProvider
-
setGeoLocationProvider
A custum geolocation provider to determine the longitude and latitude to use when no location information is set. The default implementaion uses the ipstack API and requires geolocationAccessKey and geolocationRequestHostIP
-