camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [CONF] Apache Camel > Cometd
Date Sat, 13 Mar 2010 08:05:00 GMT
    <base href="">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="">Cometd</a></h2>
     <h4>Page <b>edited</b> by             <a href="">Martin
     <div class="notificationGreySide">
         <h2><a name="Cometd-CometdComponent"></a>Cometd Component</h2>

<p>The <b>cometd:</b> component is a transport for working with the <a
href="" rel="nofollow">jetty</a> implementation of the
<a href="" rel="nofollow">cometd/bayeux
Using this component in combination with the dojo toolkit library it's possible to push Camel
messages directly into the browser using an AJAX based mechanism.</p>

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

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

<p>The <b>channelName</b> represents a topic that can be subscribed to by
the Camel endpoints.</p>

<h3><a name="Cometd-Examples"></a>Examples</h3>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
<p>where <tt>cometds:</tt> represents an SSL configured endpoint.</p>

<p>See this <a href=",_Cometd_and_Bayeux_what_a_nice_combination.html"
rel="nofollow">blog entry</a> by David Greco who contributed this component to Apache
Camel, for a full sample. </p>

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

<table class='confluenceTable'><tbody>
<th class='confluenceTh'> Name         </th>
<th class='confluenceTh'> Default Value </th>
<th class='confluenceTh'> Description </th>
<td class='confluenceTd'> <tt>resourceBase</tt>  </td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> The root directory for the web resources or classpath. Use
the protocol file: or classpath: depending if you want that the component loads the resource
from file system or classpath. Classpath is required for OSGI deployment where the resources
are packaged in the jar </td>
<td class='confluenceTd'> <tt>timeout</tt> </td>
<td class='confluenceTd'> <tt>240000</tt> </td>
<td class='confluenceTd'> The server side poll timeout in milliseconds. This is how
long the server will hold a reconnect request before responding. </td>
<td class='confluenceTd'> <tt>interval</tt> </td>
<td class='confluenceTd'>      <tt>0</tt>          </td>
<td class='confluenceTd'> The client side poll timeout in milliseconds. How long a client
will wait between reconnects</td>
<td class='confluenceTd'> <tt>maxInterval</tt> </td>
<td class='confluenceTd'> <tt>30000</tt> </td>
<td class='confluenceTd'> The max client side poll timeout in milliseconds. A client
will be removed if a connection is not received in this time. </td>
<td class='confluenceTd'> <tt>multiFrameInterval</tt>   </td>
<td class='confluenceTd'> <tt>1500</tt> </td>
<td class='confluenceTd'> The client side poll timeout, if multiple connections are
detected from the same browser. </td>
<td class='confluenceTd'> <tt>jsonCommented</tt> </td>
<td class='confluenceTd'> <tt>true</tt> </td>
<td class='confluenceTd'>  If <tt>true</tt>, the server will accept JSON
wrapped in a comment and will generate JSON wrapped in a comment. This is a defence against
Ajax Hijacking. </td>
<td class='confluenceTd'> <tt>logLevel</tt> </td>
<td class='confluenceTd'> <tt>1</tt> </td>
<td class='confluenceTd'> <tt>0</tt>=none, <tt>1</tt>=info,
<tt>2</tt>=debug. </td>

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

<p>Here is some examples on How to pass the parameters</p>

<p>For file (for webapp resources located in the Web Application directory --&gt;
For classpath (when by example the web resources are packaged inside the webapp folder --&gt;

<h3><a name="Cometd-SeeAlso"></a>See Also</h3>
	<li><a href="/confluence/display/CAMEL/Configuring+Camel" title="Configuring Camel">Configuring
	<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

     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href=""
class="grey">Change Notification Preferences</a>

       <a href="">View Online</a>
       <a href="">View
       <a href=";showCommentArea=true#addcomment">Add

View raw message