camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Camel > IRC
Date Wed, 16 Dec 2009 14:52:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="http://cwiki.apache.org/confluence/display/CAMEL/IRC">IRC</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~davsclaus">Claus
Ibsen</a>
    </h4>
     
          <br/>
     <div class="notificationGreySide">
         <h2><a name="IRC-IRCComponent"></a>IRC Component</h2>

<p>The <b>irc</b> component implements an <a href="http://en.wikipedia.org/wiki/Internet_Relay_Chat"
rel="nofollow">IRC</a> (Internet Relay Chat) transport.</p>

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

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
irc:nick@host[:port]/#room[?options]
</pre>
</div></div>

<p>In Camel 2.0, you can also use the following format:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
irc:nick@host[:port]?channels=#channel1,#channel2,#channel3[?options]
</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="IRC-Options"></a>Options</h3>

<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Name </th>
<th class='confluenceTh'> Description </th>
<th class='confluenceTh'> Example </th>
<th class='confluenceTh'> Default Value </th>
</tr>
<tr>
<td class='confluenceTd'> <tt>channels</tt> </td>
<td class='confluenceTd'> <b>Camel 2.0:</b> Comma separated list of IRC
channels to join. </td>
<td class='confluenceTd'> <tt>channels=#channel1,#channel2</tt> </td>
<td class='confluenceTd'> <tt>null</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>nickname</tt> </td>
<td class='confluenceTd'> The nickname used in chat. </td>
<td class='confluenceTd'> <tt>irc:MyNick@irc.server.org#channel</tt> or
<tt>irc:irc.server.org#channel?nickname=MyUser</tt> </td>
<td class='confluenceTd'> <tt>null</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>username</tt> </td>
<td class='confluenceTd'> The IRC server user name. </td>
<td class='confluenceTd'> <tt>irc:MyUser@irc.server.org#channel</tt> or
<tt>irc:irc.server.org#channel?username=MyUser</tt> </td>
<td class='confluenceTd'> Same as nickname. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>password</tt> </td>
<td class='confluenceTd'> The IRC server password. </td>
<td class='confluenceTd'> <tt>password=somepass</tt> </td>
<td class='confluenceTd'> <em>None</em> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>realname</tt> </td>
<td class='confluenceTd'> The IRC user's actual name. </td>
<td class='confluenceTd'> <tt>realname=MyName</tt> </td>
<td class='confluenceTd'> <em>None</em> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>colors</tt> </td>
<td class='confluenceTd'> Whether or not the server supports color codes. </td>
<td class='confluenceTd'> <tt>true, false</tt> </td>
<td class='confluenceTd'> <tt>true</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>onReply</tt> </td>
<td class='confluenceTd'> Whether or not to handle general responses to commands or
informational messages. </td>
<td class='confluenceTd'> <tt>true, false</tt> </td>
<td class='confluenceTd'> <tt>false</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>onNick</tt> </td>
<td class='confluenceTd'> Handle nickname change events. </td>
<td class='confluenceTd'> <tt>true, false</tt> </td>
<td class='confluenceTd'> <tt>true</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>onQuit</tt> </td>
<td class='confluenceTd'> Handle user quit events. </td>
<td class='confluenceTd'> <tt>true, false</tt> </td>
<td class='confluenceTd'> <tt>true</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>onJoin</tt> </td>
<td class='confluenceTd'> Handle user join events. </td>
<td class='confluenceTd'> <tt>true, false</tt> </td>
<td class='confluenceTd'> <tt>true</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>onKick</tt> </td>
<td class='confluenceTd'> Handle kick events. </td>
<td class='confluenceTd'> <tt>true, false</tt> </td>
<td class='confluenceTd'> <tt>true</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>onMode</tt> </td>
<td class='confluenceTd'> Handle mode change events. </td>
<td class='confluenceTd'> <tt>true, false</tt> </td>
<td class='confluenceTd'> <tt>true</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>onPart</tt> </td>
<td class='confluenceTd'> Handle user part events. </td>
<td class='confluenceTd'> <tt>true, false</tt> </td>
<td class='confluenceTd'> <tt>true</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>onTopic</tt> </td>
<td class='confluenceTd'> Handle topic change events. </td>
<td class='confluenceTd'> <tt>true, false</tt> </td>
<td class='confluenceTd'> <tt>true</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>onPrivmsg</tt> </td>
<td class='confluenceTd'> Handle message events. </td>
<td class='confluenceTd'> <tt>true, false</tt> </td>
<td class='confluenceTd'> <tt>true</tt> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>trustManager</tt> </td>
<td class='confluenceTd'> <b>Camel 2.0:</b> The trust manager used to verify
the SSL server's certificate. </td>
<td class='confluenceTd'> <tt>trustManager=#referenceToTrustManagerBean</tt>
</td>
<td class='confluenceTd'> The default trust manager, which accepts <em>all</em>
certificates, will be used. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>keys</tt> </td>
<td class='confluenceTd'> <b>Camel 2.2:</b> Comma separated list of IRC
channel keys. Important to be listed in same order as channels. When joining multiple channels
with only some needing keys just insert an empty value for that channel. </td>
<td class='confluenceTd'> <tt>irc:MyNick@irc.server.org/#channel?keys=chankey</tt>
</td>
<td class='confluenceTd'> <tt>null</tt> </td>
</tr>
</tbody></table>

<h3><a name="IRC-SSLSupport"></a>SSL Support</h3>

<p>As of Camel 2.0, you can also connect to an SSL enabled IRC server, as follows:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
ircs:host[:port]/#room?username=user&amp;password=pass
</pre>
</div></div>

<p>By default, the IRC transport uses <a href="http://moepii.sourceforge.net/irclib/javadoc/org/schwering/irc/lib/ssl/SSLDefaultTrustManager.html"
rel="nofollow">SSLDefaultTrustManager</a>. If you need to provide your own custom
trust manager, use the <tt>trustManager</tt> parameter as follows:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
ircs:host[:port]/#room?username=user&amp;password=pass&amp;trustManager=#referenceToMyTrustManagerBean
</pre>
</div></div>

<h3><a name="IRC-Usingkeys"></a>Using keys</h3>
<p><b>Available as of Camel 2.2</b></p>

<p>Some irc rooms requires you to provide a key to be able to join that channel. The
key is just a secret word. </p>

<p>For example we join 3 channels where as only channel 1 and 3 uses a key.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
irc:nick@irc.server.org?channels=#chan1,#chan2,#chan3&amp;keys=chan1Key,,chan3key
</pre>
</div></div>

<h3><a name="IRC-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>

     </div>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>

       <a href="http://cwiki.apache.org/confluence/display/CAMEL/IRC">View Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=60373&revisedVersion=11&originalVersion=10">View
Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/CAMEL/IRC?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message