You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2015/10/30 08:19:59 UTC

svn commit: r970734 - in /websites/production/camel/content: cache/main.pageCache weather.html

Author: buildbot
Date: Fri Oct 30 07:19:59 2015
New Revision: 970734

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/weather.html

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/camel/content/weather.html
==============================================================================
--- websites/production/camel/content/weather.html (original)
+++ websites/production/camel/content/weather.html Fri Oct 30 07:19:59 2015
@@ -96,7 +96,7 @@
 </div></div><h3 id="Weather-URIformat">URI format</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[weather://&lt;unused name&gt;[?options]
 ]]></script>
-</div></div><h3 id="Weather-REMARK">REMARK</h3><p>Since the 9th of October, an Api Key is required to access the openweather service. This key is passed as parameter to the URI definition of the weather endpoint using the appid param&#160;!</p><h3 id="Weather-Options">Options</h3><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Property</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">appid</td><td colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1" class="confluenceTd">The user Api Key to be used to call the API Weather service. This key is MANDATORY</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>location</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><c
 ode>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>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.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>lat</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Latitude of location. You can use lat and lon options instead of location.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>lon</code></p></td><td colspan
 ="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Longitude of location. You can use lat and lon options instead of location.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>period</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>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)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>headerName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To store the weather result in this header instead of the message body. This is useable if you want to keep current messag
 e body as-is.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>mode</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JSON</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The output format of the weather data. The possible values are <code>HTML</code>, <code>JSON</code> or <code>XML</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>units</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>METRIC</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The units for temperature measurement. The possible values are <code>IMPERIAL</code> or <code>METRIC</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.delay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>3600000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Delay in millis between each poll (default is 1 hour)</p></td></
 tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.initialDelay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Millis before polling starts.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.userFixedDelay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If <code>true</code>, use fixed delay between polls, otherwise fixed rate is used. See <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html" rel="nofollow">ScheduledExecutorService</a> in JDK for details.</p></td></tr></tbody></table></div></div><p>You can append query options to the URI in the following format, <code>?option=value&amp;option=value&amp;...</code></p><h3 id="Weather-Exchangedataformat">Exc
 hange data format</h3><p>Camel will deliver the body as a json formatted java.lang.String (see the <code>mode</code> option above).</p><h3 id="Weather-MessageHeaders">Message Headers</h3><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelWeatherQuery</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The original query URL sent to the Open Weather Map site</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelWeatherLocation</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Used by the producer to override the endpoint location and use the location from this header instead.</p></td></tr></tbody></table></div></div><h3 id="Weather-Samples">Samples</h3><p>In this sample w
 e find the 7 day weather forecast for Madrid, Spain:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="Weather-REMARK">REMARK</h3><p>Since the 9th of October, an Api Key is required to access the openweather service. This key is passed as parameter to the URI definition of the weather endpoint using the appid param&#160;!</p><h3 id="Weather-Options">Options</h3><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Property</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>appid</code></td><td colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16.1/2.15.5:</strong> APPID ID used to authenticate the user connected to the API Server. This key is required.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>location</code></p><
 /td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>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.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>lat</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Latitude of location. You can use lat and lon options instead of location.</p></td></tr><tr><td colspan="1" rowspan="1" cl
 ass="confluenceTd"><p><code>lon</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Longitude of location. You can use lat and lon options instead of location.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>period</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>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)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>headerName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To store the weather result in this header instead of the messag
 e body. This is useable if you want to keep current message body as-is.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>mode</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>JSON</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The output format of the weather data. The possible values are <code>HTML</code>, <code>JSON</code> or <code>XML</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>units</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>METRIC</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The units for temperature measurement. The possible values are <code>IMPERIAL</code> or <code>METRIC</code></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.delay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>3600000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Delay 
 in millis between each poll (default is 1 hour)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.initialDelay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Millis before polling starts.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>consumer.userFixedDelay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If <code>true</code>, use fixed delay between polls, otherwise fixed rate is used. See <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html" rel="nofollow">ScheduledExecutorService</a> in JDK for details.</p></td></tr></tbody></table></div></div><p>You can append query options to the URI in the following format, <code>?option=value&amp;option=value
 &amp;...</code></p><h3 id="Weather-Exchangedataformat">Exchange data format</h3><p>Camel will deliver the body as a json formatted java.lang.String (see the <code>mode</code> option above).</p><h3 id="Weather-MessageHeaders">Message Headers</h3><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelWeatherQuery</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The original query URL sent to the Open Weather Map site</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelWeatherLocation</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Used by the producer to override the endpoint location and use the location from this header instead.</p></td></tr></tbody></table></div></di
 v><h3 id="Weather-Samples">Samples</h3><p>In this sample we find the 7 day weather forecast for Madrid, Spain:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from(&quot;weather:foo?location=Madrid,Spain&amp;period=7 days&amp;appid=APIKEY&quot;).to(&quot;jms:queue:weather&quot;);
 ]]></script>
 </div></div><p>To just find the current weather for your current location you can use this:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">