camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Camel > Websocket
Date Sat, 17 Mar 2012 14:23:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/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/Websocket">Websocket</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="Websocket-WebsocketComponent"></a>Websocket Component</h2>
<p><b>Available as of Camel 2.10</b></p>

<p>The <b>websocket</b> component provides websocket <a href="/confluence/display/CAMEL/Endpoint"
title="Endpoint">endpoints</a> for communicating with clients using websocket.</p>

<h3><a name="Websocket-URIformat"></a>URI format</h3>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
websocket:<span class="code-comment">//hostname[:port][/resourceUri][?options]</span>
</pre>
</div></div>

<p>You can append query options to the URI in the following format, <tt>?option=value&amp;option=value&amp;...</tt></p>

<h3><a name="Websocket-Options"></a>Options</h3>

<p>None.</p>

<h3><a name="Websocket-MessageHeaders"></a>Message Headers</h3>

<p>The websocket component uses 2 headers to indicate to either send messages back to
a single/current client, or to all clients.</p>

<div class="confluenceTableSmall"><div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Key</th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> <tt>WebsocketConstants.SEND_TO_ALL</tt> </td>
<td class='confluenceTd'> Sends the message to all clients which are currently connected.
</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>WebsocketConstants.CONNECTION_KEY</tt> </td>
<td class='confluenceTd'> Sends the message to the client with the given connection
key. </td>
</tr>
</tbody></table>
</div>
</div>

<h3><a name="Websocket-ComponentOptions"></a>Component Options</h3>

<p>The <tt>WebsocketComponent</tt> must be configured prior to use, to setup
host, to act as a websocket server. </p>

<div class="confluenceTableSmall"></div>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Option </th>
<th class='confluenceTh'> Default </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> Host </td>
<td class='confluenceTd'> 0.0.0.0 </td>
<td class='confluenceTd'> The hostname. </td>
</tr>
<tr>
<td class='confluenceTd'> Port </td>
<td class='confluenceTd'> 9292 </td>
<td class='confluenceTd'> The port number. </td>
</tr>
<tr>
<td class='confluenceTd'> StaticResources </td>
<td class='confluenceTd'> <tt>null</tt> </td>
<td class='confluenceTd'> Path for static resources such as index.html files etc. </td>
</tr>
</tbody></table>
</div>


<h3><a name="Websocket-Usage"></a>Usage</h3>

<p>TODO: Example</p>

<h3><a name="Websocket-SeeAlso"></a>See Also</h3>
<ul>
	<li><a href="/confluence/display/CAMEL/Configuring+Camel" title="Configuring Camel">Configuring
Camel</a></li>
	<li><a href="/confluence/display/CAMEL/Component" title="Component">Component</a></li>
	<li><a href="/confluence/display/CAMEL/Endpoint" title="Endpoint">Endpoint</a></li>
	<li><a href="/confluence/display/CAMEL/Getting+Started" title="Getting Started">Getting
Started</a></li>
</ul>

<ul class="alternate" type="square">
	<li><a href="/confluence/display/CAMEL/Jetty" title="Jetty">Jetty</a></li>
</ul>

    </div>
    <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>
       <a href="https://cwiki.apache.org/confluence/display/CAMEL/Websocket">View Online</a>
              |
       <a href="https://cwiki.apache.org/confluence/display/CAMEL/Websocket?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
           </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message