Author: buildbot Date: Wed Feb 18 14:18:09 2015 New Revision: 940591 Log: Production update by buildbot for camel
Added: websites/production/camel/content/eclipse-kura.html Modified: websites/production/camel/content/cache/main.pageCache Modified: websites/production/camel/content/cache/main.pageCache ============================================================================== Binary files - no diff available. Added: websites/production/camel/content/eclipse-kura.html ============================================================================== --- websites/production/camel/content/eclipse-kura.html (added) +++ websites/production/camel/content/eclipse-kura.html Wed Feb 18 14:18:09 2015 @@ -0,0 +1,227 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<html> +<head> + <link href="//camel.apache.org/styles/site.css" rel="stylesheet" type="text/css"> + <link href="//camel.apache.org/styles/type-settings.css" rel="stylesheet" type="text/css"> + <script src="//camel.apache.org/styles/prototype.js" type="text/javascript"></script> + <script src="//camel.apache.org/styles/rico.js" type="text/javascript"></script> + <script src="//camel.apache.org/styles/site.js" type="text/javascript"></script> + + <meta http-equiv="Content-type" content="text/html;charset=UTF-8"> + + <style type="text/css"> + .maincontent { overflow:hidden; } + </style> + <!--[if IE]> + <style type="text/css"> + .maincontent { width:100%; } + </style> + <![endif]--> + + + <link href='//camel.apache.org/styles/highlighter/styles/shCoreCamel.css' rel='stylesheet' type='text/css' /> + <link href='//camel.apache.org/styles/highlighter/styles/shThemeCamel.css' rel='stylesheet' type='text/css' /> + <script src='//camel.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script> + <script src='//camel.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script> + <script src='//camel.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script> + + <script type="text/javascript"> + SyntaxHighlighter.defaults['toolbar'] = false; + SyntaxHighlighter.all(); + </script> + + <title> + Apache Camel: Eclipse Kura + </title> +</head> +<body> +<div class="white_box"> +<div class="header"> + <div class="header_l"> + <div class="header_r"> + </div> + </div> +</div> +<div class="content"> + <div class="content_l"> + <div class="content_r"> + <div> + <!-- Banner --> +<div id="banner-content"><div id="asf_logo"> + <div id="activemq_logo" style="height:108px; background:transparent url(banner.data/apache-camel-7.png) no-repeat scroll left top;"> + <a shape="rect" style="float:left; width:310px;display:block;text-indent:-5000px;text-decoration:none;line-height:140px; margin-top:20px; margin-left:18px;" href="http://camel.apache.org/">Camel</a> + <a shape="rect" style="float:right; width:180px;display:block;text-indent:-5000px;text-decoration:none;line-height:80px; margin-top:45px; margin-right:10px;" href="http://www.apache.org">Apache</a> + </div> +</div></div> + <!-- Banner --> + <div class="top_red_bar"> + <div id="site-breadcrumbs"> + <!-- Breadcrumbs --> +<a href="index.html">Apache Camel</a> > <a href="documentation.html">Documentation</a> > <a href="components.html">Components</a> > <a href="eclipse-kura.html">Eclipse Kura</a> + </div> + <!-- Quicklinks --> +<div id="site-quicklinks"><p><a shape="rect" href="download.html">Download</a> | <a shape="rect" href="javadoc.html">JavaDoc</a> | <a shape="rect" href="source.html">Source</a> | <a shape="rect" href="discussion-forums.html">Forums</a> | <a shape="rect" href="support.html">Support</a></p></div> + <!-- Quicklinks --> + </div> + + <table border="0"> + <tbody> + <tr> + <td valign="top" width="100%"> +<div class="wiki-content maincontent"><h2 id="EclipseKura-EclipseKuracomponent">Eclipse Kura component</h2><h2 id="EclipseKura-ThisdocumentationpagecoverstheintegrationoptionsofCamelwiththeEclipseKuraM2Mgateway."><span style="line-height: 1.5625;font-size: 16.0px;">This documentation page covers the integration options of Camel with the <a shape="rect" class="external-link" href="https://eclipse.org/kura/" rel="nofollow">Eclipse Kura</a> M2M gateway.</span></h2><h3 id="EclipseKura-KuraRouteractivator"><span style="line-height: 1.5625;font-size: 16.0px;">KuraRouter activator</span></h3><p>The easiest way to deploy Apache Camel routes into the Kura is to create an OSGi bundle containing the class extending <code>org.apache.camel.kura.KuraRouter</code> class:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class MyKuraRouter extends KuraRouter { + + @Override + public void configure() throws Exception { + from("timer:trigger"). + to("netty-http:http://app.mydatacenter.com/api"); + } + +}]]></script> +</div></div><p>Kura router starts its own OSGi-aware <code>CamelContext</code>. It means that for every class extending <code>KuraRouter</code>, there will be a dedicated <code>CamelContext</code> instance. Ideally we recommend to deploy one <code>KuraRouter</code> per OSGi bundle.</p><h3 id="EclipseKura-DeployingKuraRouter">Deploying KuraRouter</h3><p>Bundle containing your Kura router class should import the following bundles in the OSGi manifest:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[Import-Package: org.osgi.framework;version="1.3.0", +org.slf4j;version="1.6.4", +org.apache.camel,org.apache.camel.impl,org.apache.camel.core.osgi,org.apache.camel.builder,org.apache.camel.model, +org.apache.camel.kura]]></script> +</div></div><p>Keep in mind that you don't have to import every Camel component bundle you plan to use in your routes, as Camel components are resolved as the services on the runtime level.</p><p>Before you deploy your router bundle, be sure that you have deployed (and started) the following Camel core bundles (using Kura GoGo shell)...</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[install file:///home/user/.m2/repository/org/apache/camel/camel-core/2.15.0/camel-core-2.15.0.jar +start <camel-core-bundle-id> +install file:///home/user/.m2/repository/org/apache/camel/camel-core-osgi/2.15.0/camel-core-osgi-2.15.0.jar +start <camel-core-osgi-bundle-id> +install file:///home/user/.m2/repository/org/apache/camel/camel-kura/2.15.0/camel-kura-2.15.0.jar +start <camel-kura-bundle-id>]]></script> +</div></div><p>...and all the components you plan to use in your routes:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[install file:///home/user/.m2/repository/org/apache/camel/camel-stream/2.15/camel-stream-2.15.jar +start <camel-kura-bundle-id>]]></script> +</div></div><p>Then finally deploy your router bundle:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[install file:///home/user/.m2/repository/com/example/myrouter/1.0/myrouter-1.0.jar +start <your-bundle-id>]]></script> +</div></div><h3 id="EclipseKura-KuraRouterutilities">KuraRouter utilities<span style="font-size: 14.0px;line-height: 1.4285715;"> </span></h3><p><span style="font-size: 14.0px;line-height: 1.4285715;"> </span><span style="line-height: 1.5625;">Kura router base class provides many useful utilities. This section explores each of those.</span></p><h4 id="EclipseKura-SLF4Jlogger"><span style="line-height: 1.5625;">SLF4J logger</span></h4><p><span style="line-height: 1.5625;">Kura uses SLF4J facade for logging purposes. Protected member <code>log</code> returns SLF4J logger instance associated with the given Kura router.</span></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class MyKuraRouter extends KuraRouter { + + @Override + public void configure() throws Exception { + log.info("Configuring Camel routes!"); + ... + } + +}]]></script> +</div></div><h4 id="EclipseKura-BundleContext">BundleContext</h4><p>Protected member <code>bundleContext</code> returns bundle context associated with the given Kura router.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class MyKuraRouter extends KuraRouter { + + @Override + public void configure() throws Exception { + ServiceReference<MyService> serviceRef = bundleContext.getServiceReference(LogService.class.getName()); + MyService myService = content.getService(serviceRef); + ... + } + +}]]></script> +</div></div><h4 id="EclipseKura-CamelContext">CamelContext</h4><p>Protected member <code>camelContext</code> is the <code>CamelContext</code> associated with the given Kura router.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class MyKuraRouter extends KuraRouter { + + @Override + public void configure() throws Exception { + camelContext.getStatus(); + ... + } + +}]]></script> +</div></div><h4 id="EclipseKura-OSGiserviceresolver">OSGi service resolver</h4><p>OSGi service resolver (<code>service(Class<T> serviceType)</code>) can be used to easily retrieve service by type from the OSGi bundle context.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class MyKuraRouter extends KuraRouter { + + @Override + public void configure() throws Exception { + MyService myService = service(MyService.class); + ... + } + +}]]></script> +</div></div><p></p><h3 id="EclipseKura-SeeAlso">See Also</h3> +<ul><li><a shape="rect" href="configuring-camel.html">Configuring Camel</a></li><li><a shape="rect" href="component.html">Component</a></li><li><a shape="rect" href="endpoint.html">Endpoint</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li></ul></div> + </td> + <td valign="top"> + <div class="navigation"> + <div class="navigation_top"> + <!-- NavigationBar --> +<div class="navigation_bottom" id="navigation_bottom"><h3 id="Navigation-Overview"><a shape="rect" href="overview.html">Overview</a></h3><ul class="alternate"><li><a shape="rect" href="index.html">Home</a></li><li><a shape="rect" href="download.html">Download</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li><li><a shape="rect" href="faq.html">FAQ</a></li></ul><h3 id="Navigation-Documentation"><a shape="rect" href="documentation.html">Documentation</a></h3><ul class="alternate"><li><a shape="rect" href="user-guide.html">User Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a shape="rect" href="books.html">Books</a></li><li><a shape="rect" href="tutorials.html">Tutorials</a></li><li><a shape="rect" href="examples.html">Examples</a></li><li><a shape="rect" href="cookbook.html">Cookbook</a></li><li><a shape="rect" href="architecture.html">Architecture</a></li><li><a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a></li><li><a shape="rect" href="dsl.html">DSL</a></li><li><a shape="rect" href="components.html">Components</a></li><li><a shape="rect" href="data-format.html">Data Format</a></li><li><a shape="rect" href="languages.html">Languages</a></li><li><a shape="rect" href="security.html">Security</a></li><li><a shape="rect" href="security-advisories.html">Security Advisories</a></li></ul><h3 id="Navigation-Search">Search</h3><form enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box" action="http://www.google.com/cse"> + <div> + <input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq"> + <input type="hidden" name="ie" value="UTF-8"> + <input type="text" name="q" size="21"> + <input type="submit" name="sa" value="Search"> + </div> +</form> +<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script><h3 id="Navigation-Community"><a shape="rect" href="community.html">Community</a></h3><ul class="alternate"><li><a shape="rect" href="support.html">Support</a></li><li><a shape="rect" href="contributing.html">Contributing</a></li><li><a shape="rect" href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect" href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect" href="user-stories.html">User Stories</a></li><li><a shape="rect" href="news.html">News</a></li><li><a shape="rect" href="articles.html">Articles</a></li><li><a shape="rect" href="site.html">Site</a></li><li><a shape="rect" href="team.html">Team</a></li><li><a shape="rect" class="external-link" href="http://camel-extra.googlecode.com/" rel="nofollow">Camel Extra</a></li></ul><h3 id="Navigation-Developers"><a shape="rect" href="developers.html">Developers</a></h3><ul class="alternate" ><li><a shape="rect" href="developers.html">Developer Guide</a></li><li><a >shape="rect" href="source.html">Source</a></li><li><a shape="rect" >href="building.html">Building</a></li><li><a shape="rect" >href="javadoc.html">JavaDoc</a></li><li><a shape="rect" >href="irc-room.html">IRC Room</a></li></ul><h3 >id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul >class="alternate"><li><a shape="rect" class="external-link" >href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect" >class="external-link" >href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a > shape="rect" class="external-link" >href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a >shape="rect" class="external-link" >href="http://www.apache.org/security/">Security</a></li></ul></div> + <!-- NavigationBar --> + </div> + </div> + </td> + </tr> + </tbody> + </table> + + + <div class="bottom_red_bar"></div> + </div> + </div> + </div> +</div> +<div class="black_box"> +<div class="footer"> + <div class="footer_l"> + <div class="footer_r"> + <div> + <a href="$base/privacy-policy.html">Privacy Policy</a> - + (<a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=51811447">edit page</a>) + (<a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=51811447&showComments=true&showCommentArea=true#addcomment">add comment</a>) + </div> + </div> + </div> +</div> +</div> +</div> +<div class="design_attribution"> +© 2004-2014 The Apache Software Foundation. +<br> +Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners. +<br> +<a href="http://hiramchirino.com">Graphic Design By Hiram</a> +</div> + +<!-- Camel committers that would like access to the Analytics, send a note to priv...@camel.apache.org --> +<script type="text/javascript"> + + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-25976253-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + +</script> + +</body> +</html> + +