...
Background processing of the queued messages starts from("gtask://default")
. The first step is to enrich the previously generated ReportData
object with data from the Google weather service. The service URL is dynamically constructed by setting the Exchange.HTTP_QUERY
header to weather=<city>
. For example, if the user entered London
in the city field of the form the resulting URL is ghttp://www.google.com/ig/api?weather=London. The weather service is accessed with the ghttp component and the weather service response is aggregated into the ReportData
object using a custom aggregator returned by the reportDataAggregator()
method. Generating a simple weather report from ReportData
is done by the ReportGenerator
. The report is then sent by email with the gmail component.