camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (Confluence)" <conflue...@apache.org>
Subject [CONF] Apache Camel > Twitter Websocket Blueprint Example
Date Sat, 29 Jun 2013 10:32:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/en/2176/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/CAMEL/Twitter+Websocket+Blueprint+Example">Twitter
Websocket Blueprint Example</a></h2>
    <h4>Page  <b>added</b> by             <a href="https://cwiki.apache.org/confluence/display/~davsclaus">Claus
Ibsen</a>
    </h4>
         <br/>
    <div class="notificationGreySide">
         <h2><a name="TwitterWebsocketBlueprintExample-TwitterWebsocketBlueprintExample"></a>Twitter
Websocket Blueprint Example</h2>
<p><b>Available as of Camel 2.12</b></p>

<p>This example is located in the Camel <a href="/confluence/display/CAMEL/Download"
title="Download">distribution</a> at <tt>examples/camel-example-twitter-websocket-blueprint</tt>.</p>

<p>The example is demonstrating how to poll a constant feed of twitter searches and
publish results in real time using web socket to a web page. This example is already configured
using a testing purpose twitter account named 'cameltweet'. And therefore the example is ready
to run out of the box. This account is only for testing purpose, and should <b>not</b>
be used in your custom applications. For that you need to setup and use your own twitter account.</p>

<p>See more details at <a href="/confluence/display/CAMEL/Twitter+Websocket+Example"
title="Twitter Websocket Example">Twitter Websocket Example</a> about how to configure
twitter to use your own account.</p>

<h3><a name="TwitterWebsocketBlueprintExample-Runningthisexample"></a>Running
this example</h3>

<p>This example requires running in Apache Karaf / ServiceMix</p>

<p>You will need to install this example first to your local maven repository with:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Default; brush: java; gutter: false" style="font-size:12px; font-family:
ConfluenceInstalledFont,monospace;">
  mvn install
</pre>
</div></div>

<p>To install Apache Camel in Karaf you type in the shell (we use version 2.12.0):</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Default; brush: java; gutter: false" style="font-size:12px; font-family:
ConfluenceInstalledFont,monospace;">
  features:chooseurl camel 2.12.0
  features:install camel
</pre>
</div></div>

<p>First you need to install the following features in Karaf/ServiceMix with:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Default; brush: java; gutter: false" style="font-size:12px; font-family:
ConfluenceInstalledFont,monospace;">
  features:install camel-twitter
  features:install camel-websocket
</pre>
</div></div>

<p>Then you can install the Camel example:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Default; brush: java; gutter: false" style="font-size:12px; font-family:
ConfluenceInstalledFont,monospace;">
  osgi:install -s mvn:org.apache.camel/camel-example-twitter-websocket-blueprint/2.12.0
</pre>
</div></div>

<p>Then open a browser to see live twitter updates in the web page</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Default; brush: java; gutter: false" style="font-size:12px; font-family:
ConfluenceInstalledFont,monospace;">
  http://localhost:9090
</pre>
</div></div>

<p>When the application runs, the webpage should automatic update with new tweets. </p>

<h3><a name="TwitterWebsocketBlueprintExample-BlueprintXMLfile"></a>Blueprint
XML file</h3>

<p>The 'meat' of this example is defined in the OSGi Blueprint XML file in the <tt>src/main/resources/OSGI-INF/blueprint/camel-twitter.xml</tt>
file, which would be a good idea to take a look at, to better understand this example.</p>

<h3><a name="TwitterWebsocketBlueprintExample-Seealso"></a>See also</h3>
<ul class="alternate" type="square">
	<li><a href="/confluence/display/CAMEL/Twitter+Websocket+Example" title="Twitter
Websocket Example">Twitter Websocket Example</a></li>
	<li><a href="/confluence/display/CAMEL/Twitter" title="Twitter">Twitter</a></li>
	<li><a href="/confluence/display/CAMEL/Websocket" title="Websocket">Websocket</a></li>
	<li><a href="/confluence/display/CAMEL/Examples" title="Examples">Examples</a></li>
	<li><a href="/confluence/display/CAMEL/Tutorials" title="Tutorials">Tutorials</a></li>
	<li><a href="/confluence/display/CAMEL/User+Guide" title="User Guide">User Guide</a></li>
</ul>

    </div>
    <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;" class="grey">
                        <a href="https://cwiki.apache.org/confluence/users/removespacenotification.action?spaceKey=CAMEL">Stop
watching space</a>
            <span style="padding: 0px 5px;">|</span>
                <a href="https://cwiki.apache.org/confluence/users/editmyemailsettings.action">Change
email notification preferences</a>
</div>
       <a href="https://cwiki.apache.org/confluence/display/CAMEL/Twitter+Websocket+Blueprint+Example">View
Online</a>
              |
       <a href="https://cwiki.apache.org/confluence/display/CAMEL/Twitter+Websocket+Blueprint+Example?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
           </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message