Author: buildbot Date: Tue Nov 15 11:18:53 2016 New Revision: 1001141 Log: Production update by buildbot for camel
Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/twitter-websocket-example.html Modified: websites/production/camel/content/cache/main.pageCache ============================================================================== Binary files - no diff available. Modified: websites/production/camel/content/twitter-websocket-example.html ============================================================================== --- websites/production/camel/content/twitter-websocket-example.html (original) +++ websites/production/camel/content/twitter-websocket-example.html Tue Nov 15 11:18:53 2016 @@ -84,69 +84,20 @@ <tbody> <tr> <td valign="top" width="100%"> -<div class="wiki-content maincontent"><h2 id="TwitterWebsocketExample-TwitterWebsocketExample">Twitter Websocket Example</h2> -<p><strong>Available as of Camel 2.10</strong></p> - -<p>This example is located in the Camel <a shape="rect" href="download.html">distribution</a> at <code>examples/camel-example-twitter-websocket</code>.</p> - -<div class="confluence-information-macro confluence-information-macro-tip"><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"> -<p>There is a <a shape="rect" href="twitter-websocket-blueprint-example.html">Twitter Websocket Blueprint Example</a> for OSGi Blueprint users.</p></div></div> - -<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.<br clear="none"> -As usual the code in Camel is very simple. All it takes is roughly</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("twitter://search?...") +<div class="wiki-content maincontent"><h2 id="TwitterWebsocketExample-TwitterWebsocketExample">Twitter Websocket Example</h2><p><strong>Available as of Camel 2.10</strong></p><p>This example is located in the Camel <a shape="rect" href="download.html">distribution</a> at <code>examples/camel-example-twitter-websocket</code>.</p><div class="confluence-information-macro confluence-information-macro-tip"><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>There is a <a shape="rect" href="twitter-websocket-blueprint-example.html">Twitter Websocket Blueprint Example</a> for OSGi Blueprint users.</p></div></div><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.<br clear="none"> As usual the code in Camel is very simple. All it takes is roughly</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("twitter://search?...") .to("websocket:camel-tweet?sendToAll=true") ]]></script> -</div></div> - -<p>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.</p> - -<p>This account is only for testing purpose, and should <strong>not</strong> be used in your custom applications. For that you need to setup and use your own twitter account.</p> - -<div class="confluence-information-macro confluence-information-macro-information"><p class="title">How to use my own twitter account</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"> -<p>To use twitter, you need a twitter account which have setup an application to be used.<br clear="none"> -For twitter users, you may be familiar that twitter requires you to grant applications access to your twitter account, such as twitter for iphone etc.<br clear="none"> -The same applies for this example. You can read details about how to setup a new twitter application at the Camel <a shape="rect" href="twitter.html">Twitter</a> documentation.</p> - -<p>In your Twitter settings under the Apps menu, it will list your approved applications. For example I created an application named "Camel-Example"<br clear="none"> -which is now listed as approved with read-only access.<br clear="none"> -<span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="twitter-websocket-example.data/twitter-apps.png" data-image-src="/confluence/download/attachments/27841431/twitter-apps.png?version=1&modificationDate=1332132961000&api=v2" data-unresolved-comment-count="0" data-linked-resource-id="28017370" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="twitter-apps.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="27841431" data-linked-resource-container-version="8"></span></p> - -<p>When you have created an application, you get a number of details back from twitter<br clear="none"> -which you need to use the twitter component. Enter these details in the source code at:<br clear="none"> - <code>src/main/java/org/apache/camel/example/websocket/CamelTwitterWebSocketMain.java</code></p></div></div> - -<p>You will need to compile this example first:</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[ -mvn compile +</div></div><p>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.</p><p>This account is only for testing purpose, and should <strong>not</strong> be used in your custom applications. For that you need to setup and use your own twitter account.</p><div class="confluence-information-macro confluence-information-macro-information"><p class="title">How to use my own twitter account</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>To use twitter, you need a twitter account which have setup an <a shape="rect" class="external-link" href="https://apps.twitter.com/" rel="nofollow">application</a> to be used.<br clear="none"> For twitter users, you may be familiar that twitter requires you to grant applications access to your twitter account, such as twitter for iphone etc.<br clear="none"> Th e same applies for this example. You can read details about how to setup a new twitter application at the Camel <a shape="rect" href="twitter.html">Twitter</a> documentation.</p><p>In your Twitter settings under the Apps menu, it will list your approved applications. For example I created an application named "Camel-Example"<br clear="none"> which is now listed as approved with read-only access.<br clear="none"> <span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="twitter-websocket-example.data/twitter-apps.png" data-image-src="/confluence/download/attachments/27841431/twitter-apps.png?version=1&modificationDate=1332132961000&api=v2" data-unresolved-comment-count="0" data-linked-resource-id="28017370" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="twitter-apps.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-reso urce-container-id="27841431" data-linked-resource-container-version="9"></span></p><p>When you have created an application, you get a number of details back from twitter<br clear="none"> which you need to use the twitter component. Enter these details in the source code at:<br clear="none"> <code>src/main/java/org/apache/camel/example/websocket/CamelTwitterWebSocketMain.java</code></p></div></div><p>You will need to compile this example first:</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[mvn compile ]]></script> -</div></div> - -<p>To run the example type</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[ -mvn exec:java +</div></div><p>To run the example type</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[mvn exec:java ]]></script> -</div></div> - -<p>Then open a browser to see live twitter updates in the webpage</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[ -http://localhost:9090/index.html +</div></div><p>Then open a browser to see live twitter updates in the webpage</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[http://localhost:9090/index.html ]]></script> -</div></div> - -<p>To stop the example hit ctrl + c</p> - -<p>When the application runs, the webpage should automatic update with new tweets. A screenshot below illustrates what you would see:<br clear="none"> -<span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="twitter-websocket-example.data/gaga.png" data-image-src="/confluence/download/attachments/27841431/gaga.png?version=1&modificationDate=1332132974000&api=v2" data-unresolved-comment-count="0" data-linked-resource-id="28017371" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="gaga.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="27841431" data-linked-resource-container-version="8"></span></p> - -<h3 id="TwitterWebsocketExample-Seealso">See also</h3> -<ul class="alternate"><li><a shape="rect" href="twitter-websocket-blueprint-example.html">Twitter Websocket Blueprint Example</a></li><li><a shape="rect" href="twitter.html">Twitter</a></li><li><a shape="rect" href="websocket.html">Websocket</a></li><li><a shape="rect" href="examples.html">Examples</a></li><li><a shape="rect" href="tutorials.html">Tutorials</a></li><li><a shape="rect" href="user-guide.html">User Guide</a></li></ul></div> +</div></div><p>To stop the example hit ctrl + c</p><p>When the application runs, the webpage should automatic update with new tweets. A screenshot below illustrates what you would see:<br clear="none"> <span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="twitter-websocket-example.data/gaga.png" data-image-src="/confluence/download/attachments/27841431/gaga.png?version=1&modificationDate=1332132974000&api=v2" data-unresolved-comment-count="0" data-linked-resource-id="28017371" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="gaga.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="27841431" data-linked-resource-container-version="9"></span></p><h3 id="TwitterWebsocketExample-Seealso">See also</h3><ul class="alternate"><li><a shape="rect" href="twitter-websocket-blueprint-example.html">Twitter Web socket Blueprint Example</a></li><li><a shape="rect" href="twitter.html">Twitter</a></li><li><a shape="rect" href="websocket.html">Websocket</a></li><li><a shape="rect" href="examples.html">Examples</a></li><li><a shape="rect" href="tutorials.html">Tutorials</a></li><li><a shape="rect" href="user-guide.html">User Guide</a></li></ul></div> </td> <td valign="top"> <div class="navigation">