camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r921855 [12/14] - in /websites/production/camel/content: ./ cache/
Date Thu, 11 Sep 2014 10:19:21 GMT
Added: websites/production/camel/content/netty4.html
==============================================================================
--- websites/production/camel/content/netty4.html (added)
+++ websites/production/camel/content/netty4.html Thu Sep 11 10:19:20 2014
@@ -0,0 +1,428 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<html>
+<head>
+    <link href="//camel.apache.org/styles/site.css" rel="stylesheet" type="text/css">
+    <link href="//camel.apache.org/styles/type-settings.css" rel="stylesheet" type="text/css">
+    <script src="//camel.apache.org/styles/prototype.js" type="text/javascript"></script>
+    <script src="//camel.apache.org/styles/rico.js" type="text/javascript"></script>    
+    <script src="//camel.apache.org/styles/site.js" type="text/javascript"></script>
+
+    <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
+
+    <style type="text/css">
+      .maincontent { overflow:hidden; }
+    </style>
+    <!--[if IE]>
+    <style type="text/css">
+      .maincontent { width:100%; }
+    </style>
+    <![endif]-->
+
+
+  <link href='//camel.apache.org/styles/highlighter/styles/shCoreCamel.css' rel='stylesheet' type='text/css' />
+  <link href='//camel.apache.org/styles/highlighter/styles/shThemeCamel.css' rel='stylesheet' type='text/css' />
+  <script src='//camel.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
+  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
+  
+  <script type="text/javascript">
+  SyntaxHighlighter.defaults['toolbar'] = false;
+  SyntaxHighlighter.all();
+  </script>
+
+    <title>
+    Apache Camel: Netty4
+    </title>
+</head>
+<body>
+<div class="white_box">
+<div class="header">
+  <div class="header_l">
+    <div class="header_r">
+    </div>
+  </div>
+</div>
+<div class="content">
+  <div class="content_l">
+    <div class="content_r">
+      <div>
+          <!-- Banner -->
+<div id="banner-content"><div id="asf_logo">
+	<div id="activemq_logo" style="height:108px; background:transparent url(banner.data/apache-camel-7.png) no-repeat scroll left top;">
+            <a shape="rect" style="float:left; width:310px;display:block;text-indent:-5000px;text-decoration:none;line-height:140px; margin-top:20px; margin-left:18px;" href="http://camel.apache.org/">Camel</a>
+            <a shape="rect" style="float:right; width:180px;display:block;text-indent:-5000px;text-decoration:none;line-height:80px; margin-top:45px; margin-right:10px;" href="http://www.apache.org">Apache</a>
+	</div>
+</div></div>
+          <!-- Banner -->
+        <div class="top_red_bar">
+          <div id="site-breadcrumbs">
+                <!-- Breadcrumbs -->
+<a href="index.html">Apache Camel</a>&nbsp;&gt;&nbsp;<a href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a href="components.html">Components</a>&nbsp;&gt;&nbsp;<a href="netty4.html">Netty4</a>
+          </div>
+          <!-- Quicklinks -->
+<div id="site-quicklinks"><p><a shape="rect" href="download.html">Download</a> | <a shape="rect" href="javadoc.html">JavaDoc</a> | <a shape="rect" href="source.html">Source</a> | <a shape="rect" href="discussion-forums.html">Forums</a> | <a shape="rect" href="support.html">Support</a></p></div>
+          <!-- Quicklinks -->
+        </div>
+
+	<table border="0">
+	<tbody>
+        <tr>
+        <td valign="top" width="100%">
+<div class="wiki-content maincontent"><h2 id="Netty4-NettyComponent">Netty Component</h2><p><strong>Available as of Camel 2.14</strong></p><p>The <strong>netty4</strong> component in Camel is a socket communication component, based on the <a shape="rect" class="external-link" href="http://netty.io/" rel="nofollow">Netty</a> project version 4.<br clear="none"> Netty is a NIO client server framework which enables quick and easy development of network applications such as protocol servers and clients.<br clear="none"> Netty greatly simplifies and streamlines network programming such as TCP and UDP socket server.</p><p>This camel component supports both producer and consumer endpoints.</p><p>The Netty component has several options and allows fine-grained control of a number of TCP/UDP communication parameters (buffer sizes, keepAlives, tcpNoDelay etc) and facilitates both In-Only and In-Out communication on a Camel route.</p><p>Maven users will need to add the following dependency to th
 eir <code>pom.xml</code> for this component:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
+    &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+    &lt;artifactId&gt;camel-netty4&lt;/artifactId&gt;
+    &lt;version&gt;x.x.x&lt;/version&gt;
+    &lt;!-- use the same version as your Camel core version --&gt;
+&lt;/dependency&gt;
+]]></script>
+</div></div><h3 id="Netty4-URIformat">URI format</h3><p>The URI scheme for a netty component is as follows</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[netty:tcp://localhost:99999[?options]
+netty:udp://remotehost:99999/[?options]
+]]></script>
+</div></div><p>This component supports producer and consumer endpoints for both TCP and UDP.</p><p>You can append query options to the URI in the following format, <code>?option=value&amp;option=value&amp;...</code></p><h3 id="Netty4-Options">Options</h3><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>keepAlive</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Setting to ensure socket is not closed due to inactivity</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>tcpNoDelay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p
 ><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Setting to improve TCP protocol performance</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>backlog</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Allows to configure a backlog for netty consumer (server). Note the backlog is just a best effort depending on the OS. Setting this option to a value such as <code>200</code>, <code>500</code> or <code>1000</code>, tells the TCP stack how long the "accept" queue can be. If this option is not configured, then the backlog depends on OS setting.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>broadcast</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Setting to choose Multicast over UDP</p></td></tr><tr><td colspan="1" rowspan="1"
  class="confluenceTd"><p><code>connectTimeout</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>10000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Time to wait for a socket connection to be available. Value is in millis.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>reuseAddress</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Setting to facilitate socket multiplexing</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sync</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Setting to set endpoint as one-way or request-response</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>synchronous</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p>
 </td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether <a shape="rect" href="asynchronous-routing-engine.html">Asynchronous Routing Engine</a> is not in use. <code>false</code> then the <a shape="rect" href="asynchronous-routing-engine.html">Asynchronous Routing Engine</a> is used, <code>true</code> to force processing synchronous.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>ssl</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Setting to specify whether SSL encryption is applied to this endpoint</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sslClientCertHeaders</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>When enabled and in SSL mode, then the Netty consumer will enrich the Camel <a shape="rect" href="message.html">Mess
 age</a> with headers having information about the client certificate such as subject name, issuer name, serial number, and the valid date range.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sendBufferSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>65536 bytes</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The TCP/UDP buffer sizes to be used during outbound communication. Size is bytes.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>receiveBufferSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>65536 bytes</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The TCP/UDP buffer sizes to be used during inbound communication. Size is bytes.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>option.XXX</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan
 ="1" class="confluenceTd"><p>Allows to configure additional netty options using "option." as prefix. For example "option.child.keepAlive=false" to set the netty option "child.keepAlive=false". See the Netty documentation for possible options that can be used.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>corePoolSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>10</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The number of allocated threads at component startup. Defaults to 10. <strong>Note:</strong> This option is removed from Camel 2.9.2 onwards. As we rely on Nettys default settings.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>maxPoolSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>100</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The maximum number of threads that may be allocated to this endpoint. Defaults to 100. <strong
 >Note:</strong> This option is removed from Camel 2.9.2 onwards. As we rely on Nettys default settings.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>disconnect</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>lazyChannelCreation</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Channels can be lazily created to avoid exceptions, if the remote server is not up and running when the Camel producer is started.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>transferExchange</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</co
 de></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Only used for TCP. You can transfer the exchange over the wire instead of just the body. The following fields are transferred: In body, Out body, fault body, In headers, Out headers, fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>disconnectOnNoReply</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If sync is enabled then this option dictates NettyConsumer if it should disconnect where there is no reply to send back.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>noReplyLogLevel</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>WARN</code></p></td><td colspan="1" rowspan="1
 " class="confluenceTd"><p>If sync is enabled this option dictates NettyConsumer which logging level to use when logging a there is no reply to send back. Values are: <code>FATAL, ERROR, INFO, DEBUG, OFF</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>serverExceptionCaughtLogLevel</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>WARN</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If the server (NettyConsumer) catches an exception then its logged using this logging level.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>serverClosedChannelExceptionCaughtLogLevel</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>DEBUG</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If the server (NettyConsumer) catches an <code>java.nio.channels.ClosedChannelException</code> then its logged using this logging level. This is used to avoid logging the closed c
 hannel exceptions, as clients can disconnect abruptly and then cause a flod of closed exceptions in the Netty server.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>allowDefaultCodec</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The netty component installs a default codec if both, encoder/deocder is null and textline is false. Setting allowDefaultCodec to false prevents the netty component from installing a default codec as the first element in the filter chain.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>textline</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Only used for TCP. If no codec is specified, you can use this flag to indicate a text line based codec; if not specified or the value is false, then Object Serialization is
  assumed over TCP.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>delimiter</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>LINE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The delimiter to use for the textline codec. Possible values are <code>LINE</code> and <code>NULL</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>decoderMaxLineLength</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1024</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The max line length to use for the textline codec.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>autoAppendDelimiter</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not to auto append missing end delimiter when sending using the textline codec.</p></td></tr><tr><t
 d colspan="1" rowspan="1" class="confluenceTd"><p><code>encoding</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The encoding (a charset name) to use for the textline codec. If not provided, Camel will use the JVM default Charset.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>workerCount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;When netty works on nio mode, it uses default workerCount parameter from Netty, which is cpu_core_threads*2. User can use this operation to override the default workerCount from Netty</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sslContextParameters</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;
 SSL configuration using an <code>org.apache.camel.util.jsse.SSLContextParameters</code> instance. See <a shape="rect" href="#Netty4-UsingtheJSSEConfigurationUtility">Using the JSSE Configuration Utility</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>receiveBufferSizePredictor</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Configures the buffer size predictor. See details at Jetty documentation and this <a shape="rect" class="external-link" href="http://lists.jboss.org/pipermail/netty-users/2010-January/001958.html" rel="nofollow">mail thread</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>requestTimeout</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>0</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Allows to use a timeout for the Netty producer when calling a remote server. By d
 efault no timeout is in use. The value is in milli seconds, so eg <code>30000</code> is 30 seconds.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>needClientAuth</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;Configures whether the server needs client authentication when using SSL.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>usingExecutorService</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether to use executorService to handle the message inside the camel route, the executorService can be set from NettyComponent.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>maximumPoolSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>16</code></p></td><td colspan="1" rowspan="1" c
 lass="confluenceTd"><p>The core pool size for the ordered thread pool, if its in use.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>producerPoolEnabled</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Producer only. Whether producer pool is enabled or not. <strong>Important:</strong> Do not turn this off, as the pooling is needed for handling concurrency and reliable request/reply.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>producerPoolMaxActive</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>-1</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Producer only. Sets the cap on the number of objects that can be allocated by the pool (checked out to clients, or idle awaiting checkout) at a given time. Use a negative value for no limit.</p></td></tr><tr><td colspan="1" rowspan="1" class="conf
 luenceTd"><p><code>producerPoolMinIdle</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>0</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Producer only. Sets the minimum number of instances allowed in the producer pool before the evictor thread (if active) spawns new objects.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>producerPoolMaxIdle</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>100</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Producer only. Sets the cap on the number of "idle" instances in the pool.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>producerPoolMinEvictableIdle</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>30000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Producer only. Sets the minimum amount of time (value in millis) an object may sit idle in the pool before it is 
 eligible for eviction by the idle object evictor.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bootstrapConfiguration</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Consumer only. Allows to configure the Netty ServerBootstrap options using a <code>org.apache.camel.component.netty4.NettyServerBootstrapConfiguration</code> instance. This can be used to reuse the same configuration for multiple consumers, to align their configuration more easily.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bossPoll</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a explicit <code>io.netty.<code>channel.EventLoopGroup</code> </code> as the boss thread pool. For example to share a thread pool with multiple consumers. By default each consumer has t
 heir own boss pool with 1 core thread.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>workerPool</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a explicit <code>io.netty.channel.EventLoopGroup</code> as the worker thread pool. For example to share a thread pool with multiple consumers. By default each consumer has their own worker pool with 2 x cpu count core threads.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>networkInterface</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Consumer only. When using UDP then this option can be used to specify a network interface by its name, such as <code>eth0</code> to join a multicast group.</p></td></tr></tbody></table></div></div><h3 id="Netty4-RegistrybasedOptions">Registry based Options
 </h3><p>Codec Handlers and SSL Keystores can be enlisted in the <a shape="rect" href="registry.html">Registry</a>, such as in the Spring XML file.<br clear="none"> The values that could be passed in, are the following:</p><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>passphrase</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>password setting to use in order to encrypt/decrypt payloads sent using SSH</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>keyStoreFormat</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>keystore format to be used for payload encryption. Defaults to "JKS" if not set</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>secur
 ityProvider</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Security provider to be used for payload encryption. Defaults to "SunX509" if not set.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>keyStoreFile</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>deprecated:</strong> Client side certificate keystore to be used for encryption</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>trustStoreFile</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>deprecated:</strong> Server side certificate keystore to be used for encryption</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>keyStoreResource</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11.1:</strong> Client side certificate keystore to be used for encryption. Is loaded by default from classpath, but you can prefix with <code>"classpath:"</code>, <code
 >"file:"</code>, or <code>"http:"</code> to load the resource from different systems.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>trustStoreResource</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11.1:</strong> Server side certificate keystore to be used for encryption. Is loaded by default from classpath, but you can prefix with <code>"classpath:"</code>, <code>"file:"</code>, or <code>"http:"</code> to load the resource from different systems.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sslHandler</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Reference to a class that could be used to return an SSL Handler</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>encoder</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A custom <code>ChannelHandler</code> class that can be used to perform special marshalling of outbound payloads.
  Must override <code>org.jboss.netty.channel.ChannelDownStreamHandler</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>encorders</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A list of encoders to be used. You can use a String which have values separated by comma, and have the values be looked up in the <a shape="rect" href="registry.html">Registry</a>. Just remember to prefix the value with # so Camel knows it should lookup.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>decoder</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A custom <code>ChannelHandler</code> class that can be used to perform special marshalling of inbound payloads. Must override <code>org.jboss.netty.channel.ChannelUpStreamHandler</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>decoders</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A list of decoders to be
  used. You can use a String which have values separated by comma, and have the values be looked up in the <a shape="rect" href="registry.html">Registry</a>. Just remember to prefix the value with # so Camel knows it should lookup.</p></td></tr></tbody></table></div></div><p><strong>Important:</strong> Read below about using non shareable encoders/decoders.</p><h4 id="Netty4-Usingnonshareableencodersordecoders">Using non shareable encoders or decoders</h4><p>If your encoders or decoders is not shareable (eg they have the @Shareable class annotation), then your encoder/decoder must implement the <code>org.apache.camel.component.netty.ChannelHandlerFactory</code> interface, and return a new instance in the <code>newChannelHandler</code> method. This is to ensure the encoder/decoder can safely be used. If this is not the case, then the Netty component will log a WARN when<br clear="none"> an endpoint is created.</p><p>The Netty component offers a <code>org.apache.camel.component.netty.C
 hannelHandlerFactories</code> factory class, that has a number of commonly used methods.</p><h3 id="Netty4-SendingMessagesto/fromaNettyendpoint">Sending Messages to/from a Netty endpoint</h3><h4 id="Netty4-NettyProducer">Netty Producer</h4><p>In Producer mode, the component provides the ability to send payloads to a socket endpoint<br clear="none"> using either TCP or UDP protocols (with optional SSL support).</p><p>The producer mode supports both one-way and request-response based operations.</p><h4 id="Netty4-NettyConsumer">Netty Consumer</h4><p>In Consumer mode, the component provides the ability to:</p><ul class="alternate"><li>listen on a specified socket using either TCP or UDP protocols (with optional SSL support),</li><li>receive requests on the socket using text/xml, binary and serialized object based payloads and</li><li>send them along on a route as message exchanges.</li></ul><p>The consumer mode supports both one-way and request-response based operations.</p><h3 id="Net
 ty4-UsageSamples">Usage Samples</h3><h4 id="Netty4-AUDPNettyendpointusingRequest-Replyandserializedobjectpayload">A UDP Netty endpoint using Request-Reply and serialized object payload</h4><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[RouteBuilder builder = new RouteBuilder() {
+  public void configure() {
+    from(&quot;netty4:udp://localhost:5155?sync=true&quot;)
+      .process(new Processor() {
+         public void process(Exchange exchange) throws Exception {
+           Poetry poetry = (Poetry) exchange.getIn().getBody();
+           poetry.setPoet(&quot;Dr. Sarojini Naidu&quot;);
+           exchange.getOut().setBody(poetry);
+         }
+       }
+    }
+};
+]]></script>
+</div></div><h4 id="Netty4-ATCPbasedNettyconsumerendpointusingOne-waycommunication">A TCP based Netty consumer endpoint using One-way communication</h4><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[RouteBuilder builder = new RouteBuilder() {
+  public void configure() {
+       from(&quot;netty4:tcp://localhost:5150&quot;)
+           .to(&quot;mock:result&quot;);
+  }
+};
+]]></script>
+</div></div><h4 id="Netty4-AnSSL/TCPbasedNettyconsumerendpointusingRequest-Replycommunication">An SSL/TCP based Netty consumer endpoint using Request-Reply communication</h4><h5 id="Netty4-UsingtheJSSEConfigurationUtility">Using the JSSE Configuration Utility</h5><p>As of Camel 2.9, the Netty component supports SSL/TLS configuration through the <a shape="rect" href="camel-configuration-utilities.html">Camel JSSE Configuration Utility</a>.&#160; This utility greatly decreases the amount of component specific code you need to write and is configurable at the endpoint and component levels.&#160; The following examples demonstrate how to use the utility with the Netty component.</p><h6 id="Netty4-Programmaticconfigurationofthecomponent">Programmatic configuration of the component</h6><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[KeyStoreParameters ksp = new KeyStoreParameters();
+ksp.setResource(&quot;/users/home/server/keystore.jks&quot;);
+ksp.setPassword(&quot;keystorePassword&quot;);
+
+KeyManagersParameters kmp = new KeyManagersParameters();
+kmp.setKeyStore(ksp);
+kmp.setKeyPassword(&quot;keyPassword&quot;);
+
+SSLContextParameters scp = new SSLContextParameters();
+scp.setKeyManagers(kmp);
+
+NettyComponent nettyComponent = getContext().getComponent(&quot;netty&quot;, NettyComponent.class);
+nettyComponent.setSslContextParameters(scp);
+]]></script>
+</div></div><h6 id="Netty4-SpringDSLbasedconfigurationofendpoint">Spring DSL based configuration of endpoint</h6><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[...
+  &lt;camel:sslContextParameters
+      id=&quot;sslContextParameters&quot;&gt;
+    &lt;camel:keyManagers
+        keyPassword=&quot;keyPassword&quot;&gt;
+      &lt;camel:keyStore
+          resource=&quot;/users/home/server/keystore.jks&quot;
+          password=&quot;keystorePassword&quot;/&gt;
+    &lt;/camel:keyManagers&gt;
+  &lt;/camel:sslContextParameters&gt;...
+...
+  &lt;to uri=&quot;netty4:tcp://localhost:5150?sync=true&amp;ssl=true&amp;sslContextParameters=#sslContextParameters&quot;/&gt;
+...
+]]></script>
+</div></div><h5 id="Netty4-UsingBasicSSL/TLSconfigurationontheJettyComponent">Using Basic SSL/TLS configuration on the Jetty Component</h5><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[JndiRegistry registry = new JndiRegistry(createJndiContext());
+registry.bind(&quot;password&quot;, &quot;changeit&quot;);
+registry.bind(&quot;ksf&quot;, new File(&quot;src/test/resources/keystore.jks&quot;));
+registry.bind(&quot;tsf&quot;, new File(&quot;src/test/resources/keystore.jks&quot;));
+
+context.createRegistry(registry);
+context.addRoutes(new RouteBuilder() {
+  public void configure() {
+      String netty_ssl_endpoint =
+         &quot;netty4:tcp://localhost:5150?sync=true&amp;ssl=true&amp;passphrase=#password&quot;
+         + &quot;&amp;keyStoreFile=#ksf&amp;trustStoreFile=#tsf&quot;;
+      String return_string =
+         &quot;When You Go Home, Tell Them Of Us And Say,&quot;
+         + &quot;For Your Tomorrow, We Gave Our Today.&quot;;
+
+      from(netty_ssl_endpoint)
+       .process(new Processor() {
+          public void process(Exchange exchange) throws Exception {
+            exchange.getOut().setBody(return_string);
+          }
+       }
+  }
+});
+]]></script>
+</div></div><h5 id="Netty4-GettingaccesstoSSLSessionandtheclientcertificate">Getting access to SSLSession and the client certificate</h5><p><strong>Available as of Camel 2.12</strong></p><p>You can get access to the <code>javax.net.ssl.SSLSession</code> if you eg need to get details about the client certificate. When <code>ssl=true</code> then the <a shape="rect" href="netty4.html">Netty4</a> component will store the <code>SSLSession</code> as a header on the Camel <a shape="rect" href="message.html">Message</a> as shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[SSLSession session = exchange.getIn().getHeader(NettyConstants.NETTY_SSL_SESSION, SSLSession.class);
+// get the first certificate which is client certificate
+javax.security.cert.X509Certificate cert = session.getPeerCertificateChain()[0];
+Principal principal = cert.getSubjectDN();
+]]></script>
+</div></div><p>Remember to set <code>needClientAuth=true</code> to authenticate the client, otherwise <code>SSLSession</code> cannot access information about the client certificate, and you may get an exception <code>javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated</code>. You may also get this exception if the client certificate is expired or not valid etc.</p>    <div class="aui-message success shadowed information-macro">
+                            <span class="aui-icon icon-success">Icon</span>
+                <div class="message-content">
+                            <p>The option <code>sslClientCertHeaders</code> can be set to <code>true</code> which then enriches the Camel <a shape="rect" href="message.html">Message</a> with headers having details about the client certificate. For example the subject name is readily available in the header <code>CamelNettySSLClientCertSubjectName</code>.</p>
+                    </div>
+    </div>
+<h4 id="Netty4-UsingMultipleCodecs">Using Multiple Codecs</h4><p>In certain cases it may be necessary to add chains of encoders and decoders to the netty pipeline. To add multpile codecs to a camel netty endpoint the 'encoders' and 'decoders' uri parameters should be used. Like the 'encoder' and 'decoder' parameters they are used to supply references (to lists of ChannelUpstreamHandlers and ChannelDownstreamHandlers) that should be added to the pipeline. Note that if encoders is specified then the encoder param will be ignored, similarly for decoders and the decoder param.</p>    <div class="aui-message hint shadowed information-macro">
+                            <span class="aui-icon icon-hint">Icon</span>
+                <div class="message-content">
+                            <p>Read further above about using non shareable encoders/decoders.</p>
+                    </div>
+    </div>
+<p>The lists of codecs need to be added to the Camel's registry so they can be resolved when the endpoint is created.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+
+ChannelHandlerFactory lengthDecoder = ChannelHandlerFactories.newLengthFieldBasedFrameDecoder(1048576, 0, 4, 0, 4);
+ 
+StringDecoder stringDecoder = new StringDecoder();
+registry.bind(&quot;length-decoder&quot;, lengthDecoder);
+registry.bind(&quot;string-decoder&quot;, stringDecoder);
+ 
+LengthFieldPrepender lengthEncoder = new LengthFieldPrepender(4);
+StringEncoder stringEncoder = new StringEncoder();
+registry.bind(&quot;length-encoder&quot;, lengthEncoder);
+registry.bind(&quot;string-encoder&quot;, stringEncoder);
+ 
+List&lt;ChannelHandler&gt; decoders = new ArrayList&lt;ChannelHandler&gt;();
+decoders.add(lengthDecoder);
+decoders.add(stringDecoder);
+ 
+List&lt;ChannelHandler&gt; encoders = new ArrayList&lt;ChannelHandler&gt;();
+encoders.add(lengthEncoder);
+encoders.add(stringEncoder);
+ 
+registry.bind(&quot;encoders&quot;, encoders);
+registry.bind(&quot;decoders&quot;, decoders);
+
+
+]]></script>
+</div></div><p>Spring's native collections support can be used to specify the codec lists in an application context</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[   
+&lt;util:list id=&quot;decoders&quot; list-class=&quot;java.util.LinkedList&quot;&gt;
+        &lt;bean class=&quot;org.apache.camel.component.netty4.ChannelHandlerFactories&quot; factory-method=&quot;newLengthFieldBasedFrameDecoder&quot;&gt;
+            &lt;constructor-arg value=&quot;1048576&quot;/&gt;
+            &lt;constructor-arg value=&quot;0&quot;/&gt;
+            &lt;constructor-arg value=&quot;4&quot;/&gt;
+            &lt;constructor-arg value=&quot;0&quot;/&gt;
+            &lt;constructor-arg value=&quot;4&quot;/&gt;
+        &lt;/bean&gt;
+        &lt;bean class=&quot;io.netty.handler.codec.string.StringDecoder&quot;/&gt;
+    &lt;/util:list&gt;
+
+    &lt;util:list id=&quot;encoders&quot; list-class=&quot;java.util.LinkedList&quot;&gt;
+        &lt;bean class=&quot;io.netty.handler.codec.LengthFieldPrepender&quot;&gt;
+            &lt;constructor-arg value=&quot;4&quot;/&gt;
+        &lt;/bean&gt;
+        &lt;bean class=&quot;io.netty.handler.codec.string.StringEncoder&quot;/&gt;
+    &lt;/util:list&gt;
+
+    &lt;bean id=&quot;length-encoder&quot; class=&quot;io.netty.handler.codec.LengthFieldPrepender&quot;&gt;
+        &lt;constructor-arg value=&quot;4&quot;/&gt;
+    &lt;/bean&gt;
+    &lt;bean id=&quot;string-encoder&quot; class=&quot;io.netty.handler.codec.string.StringEncoder&quot;/&gt;
+
+    &lt;bean id=&quot;length-decoder&quot; class=&quot;org.apache.camel.component.netty4.ChannelHandlerFactories&quot; factory-method=&quot;newLengthFieldBasedFrameDecoder&quot;&gt;
+        &lt;constructor-arg value=&quot;1048576&quot;/&gt;
+        &lt;constructor-arg value=&quot;0&quot;/&gt;
+        &lt;constructor-arg value=&quot;4&quot;/&gt;
+        &lt;constructor-arg value=&quot;0&quot;/&gt;
+        &lt;constructor-arg value=&quot;4&quot;/&gt;
+    &lt;/bean&gt;
+    &lt;bean id=&quot;string-decoder&quot; class=&quot;io.netty.handler.codec.string.StringDecoder&quot;/&gt;
+]]></script>
+</div></div><p>The bean names can then be used in netty endpoint definitions either as a comma separated list or contained in a List e.g.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+ from(&quot;direct:multiple-codec&quot;).to(&quot;netty4:tcp://localhost:{{port}}?encoders=#encoders&amp;sync=false&quot;);
+                
+ from(&quot;netty4:tcp://localhost:{{port}}?decoders=#length-decoder,#string-decoder&amp;sync=false&quot;).to(&quot;mock:multiple-codec&quot;);
+]]></script>
+</div></div><p>or via spring.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+   &lt;camelContext id=&quot;multiple-netty-codecs-context&quot; xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
+        &lt;route&gt;
+            &lt;from uri=&quot;direct:multiple-codec&quot;/&gt;
+            &lt;to uri=&quot;netty4:tcp://localhost:5150?encoders=#encoders&amp;amp;sync=false&quot;/&gt;
+        &lt;/route&gt;
+        &lt;route&gt;
+            &lt;from uri=&quot;netty4:tcp://localhost:5150?decoders=#length-decoder,#string-decoder&amp;amp;sync=false&quot;/&gt;
+            &lt;to uri=&quot;mock:multiple-codec&quot;/&gt;
+        &lt;/route&gt;
+    &lt;/camelContext&gt;
+]]></script>
+</div></div><h3 id="Netty4-ClosingChannelWhenComplete">Closing Channel When Complete</h3><p>When acting as a server you sometimes want to close the channel when, for example, a client conversion is finished.<br clear="none"> You can do this by simply setting the endpoint option <code>disconnect=true</code>.</p><p>However you can also instruct Camel on a per message basis as follows.<br clear="none"> To instruct Camel to close the channel, you should add a header with the key <code>CamelNettyCloseChannelWhenComplete</code> set to a boolean <code>true</code> value.<br clear="none"> For instance, the example below will close the channel after it has written the bye message back to the client:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[        from(&quot;netty4:tcp://localhost:8080&quot;).process(new Processor() {
+            public void process(Exchange exchange) throws Exception {
+                String body = exchange.getIn().getBody(String.class);
+                exchange.getOut().setBody(&quot;Bye &quot; + body);
+                // some condition which determines if we should close
+                if (close) {
+                    exchange.getOut().setHeader(NettyConstants.NETTY_CLOSE_CHANNEL_WHEN_COMPLETE, true);
+                }
+            }
+        });
+]]></script>
+</div></div><h3 id="Netty4-Addingcustomchannelpipelinefactoriestogaincompletecontroloveracreatedpipeline">Adding custom channel pipeline factories to gain complete control over a created pipeline</h3><p><strong>Available as of Camel 2.5</strong></p><p>Custom channel pipelines provide complete control to the user over the handler/interceptor chain by inserting custom handler(s), encoder(s) &amp; decoders without having to specify them in the Netty Endpoint URL in a very simple way.</p><p>In order to add a custom pipeline, a custom channel pipeline factory must be created and registered with the context via the context registry (JNDIRegistry,or the camel-spring ApplicationContextRegistry etc).</p><p>A custom pipeline factory must be constructed as follows</p><ul><li>A Producer linked channel pipeline factory must extend the abstract class <code>ClientPipelineFactory</code>.</li><li>A Consumer linked channel pipeline factory must extend the abstract class <code>ServerPipelineFactory</c
 ode>.</li><li>The classes should override the getPipeline() method in order to insert custom handler(s), encoder(s) and decoder(s). Not overriding the getPipeline() method creates a pipeline with no handlers, encoders or decoders wired to the pipeline.</li></ul><p>The example below shows how ServerChannel Pipeline factory may be created</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Using custom pipeline factory</b></div><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class SampleServerChannelPipelineFactory extends ServerPipelineFactory {
+    private int maxLineSize = 1024;
+
+    public ChannelPipeline getPipeline() throws Exception {
+        ChannelPipeline channelPipeline = Channels.pipeline();
+
+        channelPipeline.addLast(&quot;encoder-SD&quot;, new StringEncoder(CharsetUtil.UTF_8));
+        channelPipeline.addLast(&quot;decoder-DELIM&quot;, new DelimiterBasedFrameDecoder(maxLineSize, true, Delimiters.lineDelimiter()));
+        channelPipeline.addLast(&quot;decoder-SD&quot;, new StringDecoder(CharsetUtil.UTF_8));
+        // here we add the default Camel ServerChannelHandler for the consumer, to allow Camel to route the message etc.
+        channelPipeline.addLast(&quot;handler&quot;, new ServerChannelHandler(consumer));
+
+        return channelPipeline;
+    }
+}
+]]></script>
+</div></div><p>The custom channel pipeline factory can then be added to the registry and instantiated/utilized on a camel route in the following way</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[Registry registry = camelContext.getRegistry();
+serverPipelineFactory = new TestServerChannelPipelineFactory();
+registry.bind(&quot;spf&quot;, serverPipelineFactory);
+context.addRoutes(new RouteBuilder() {
+  public void configure() {
+      String netty_ssl_endpoint =
+         &quot;netty4:tcp://localhost:5150?serverPipelineFactory=#spf&quot;
+      String return_string =
+         &quot;When You Go Home, Tell Them Of Us And Say,&quot;
+         + &quot;For Your Tomorrow, We Gave Our Today.&quot;;
+
+      from(netty_ssl_endpoint)
+       .process(new Processor() {
+          public void process(Exchange exchange) throws Exception {
+            exchange.getOut().setBody(return_string);
+          }
+       }
+  }
+});
+
+]]></script>
+</div></div><h3 id="Netty4-ReusingNettybossandworkerthreadpools">Reusing Netty boss and worker thread pools</h3><p><strong>Available as of Camel 2.12</strong></p><p>Netty has two kind of thread pools: boss and worker. By default each Netty consumer and producer has their private thread pools. If you want to reuse these thread pools among multiple consumers or producers then the thread pools must be created and enlisted in the <a shape="rect" href="registry.html">Registry</a>.</p><p>For example using Spring XML we can create a shared worker thread pool using the <code>NettyWorkerPoolBuilder</code> with 2 worker threads as shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[  &lt;!-- use the worker pool builder to create to help create the shared thread pool --&gt;
+  &lt;bean id=&quot;poolBuilder&quot; class=&quot;org.apache.camel.component.netty.NettyWorkerPoolBuilder&quot;&gt;
+    &lt;property name=&quot;workerCount&quot; value=&quot;2&quot;/&gt;
+  &lt;/bean&gt;
+
+  &lt;!-- the shared worker thread pool --&gt;
+  &lt;bean id=&quot;sharedPool&quot; class=&quot;org.jboss.netty.channel.socket.nio.WorkerPool&quot;
+        factory-bean=&quot;poolBuilder&quot; factory-method=&quot;build&quot; destroy-method=&quot;shutdown&quot;&gt;
+  &lt;/bean&gt;
+]]></script>
+</div></div>    <div class="aui-message success shadowed information-macro">
+                            <span class="aui-icon icon-success">Icon</span>
+                <div class="message-content">
+                            <p>For boss thread pool there is a <code>org.apache.camel.component.netty4.NettyServerBossPoolBuilder</code> builder for Netty consumers, and a <code>org.apache.camel.component.netty4.NettyClientBossPoolBuilder</code> for the Netty produces.</p>
+                    </div>
+    </div>
+<p>Then in the Camel routes we can refer to this worker pools by configuring the <code>workerPool</code> option in the <a shape="rect" class="unresolved" href="#">URI</a> as shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[    &lt;route&gt;
+      &lt;from uri=&quot;netty4:tcp://localhost:5021?textline=true&amp;amp;sync=true&amp;amp;workerPool=#sharedPool&amp;amp;usingExecutorService=false&quot;/&gt;
+      &lt;to uri=&quot;log:result&quot;/&gt;
+      ...
+    &lt;/route&gt;
+]]></script>
+</div></div><p>And if we have another route we can refer to the shared worker pool:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[    &lt;route&gt;
+      &lt;from uri=&quot;netty4:tcp://localhost:5022?textline=true&amp;amp;sync=true&amp;amp;workerPool=#sharedPool&amp;amp;usingExecutorService=false&quot;/&gt;
+      &lt;to uri=&quot;log:result&quot;/&gt;
+      ...
+    &lt;/route&gt;
+]]></script>
+</div></div><p>... and so forth.</p><p></p><h3 id="Netty4-SeeAlso">See Also</h3>
+<ul><li><a shape="rect" href="configuring-camel.html">Configuring Camel</a></li><li><a shape="rect" href="component.html">Component</a></li><li><a shape="rect" href="endpoint.html">Endpoint</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li></ul><ul class="alternate"><li><a shape="rect" href="netty-http.html">Netty HTTP</a></li><li><a shape="rect" href="mina.html">MINA</a></li></ul></div>
+        </td>
+        <td valign="top">
+          <div class="navigation">
+            <div class="navigation_top">
+                <!-- NavigationBar -->
+<div class="navigation_bottom" id="navigation_bottom"><h3 id="Navigation-Overview"><a shape="rect" href="overview.html">Overview</a></h3><ul class="alternate"><li><a shape="rect" href="index.html">Home</a></li><li><a shape="rect" href="download.html">Download</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li><li><a shape="rect" href="faq.html">FAQ</a></li></ul><h3 id="Navigation-Documentation"><a shape="rect" href="documentation.html">Documentation</a></h3><ul class="alternate"><li><a shape="rect" href="user-guide.html">User Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a shape="rect" href="books.html">Books</a></li><li><a shape="rect" href="tutorials.html">Tutorials</a></li><li><a shape="rect" href="examples.html">Examples</a></li><li><a shape="rect" href="cookbook.html">Cookbook</a></li><li><a shape="rect" href="architecture.html">Architecture</a></li><li><a shape="rect" href="enterprise-integration-patterns.html">Enterprise
  Integration Patterns</a></li><li><a shape="rect" href="dsl.html">DSL</a></li><li><a shape="rect" href="components.html">Components</a></li><li><a shape="rect" href="data-format.html">Data Format</a></li><li><a shape="rect" href="languages.html">Languages</a></li><li><a shape="rect" href="security.html">Security</a></li><li><a shape="rect" href="security-advisories.html">Security Advisories</a></li></ul><h3 id="Navigation-Search">Search</h3><form enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box" action="http://www.google.com/cse">
+  <div>
+    <input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq">
+    <input type="hidden" name="ie" value="UTF-8">
+    <input type="text" name="q" size="21">
+    <input type="submit" name="sa" value="Search">
+  </div>
+</form>
+<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script><h3 id="Navigation-Community"><a shape="rect" href="community.html">Community</a></h3><ul class="alternate"><li><a shape="rect" href="support.html">Support</a></li><li><a shape="rect" href="contributing.html">Contributing</a></li><li><a shape="rect" href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect" href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect" href="user-stories.html">User Stories</a></li><li><a shape="rect" href="news.html">News</a></li><li><a shape="rect" href="articles.html">Articles</a></li><li><a shape="rect" href="site.html">Site</a></li><li><a shape="rect" href="team.html">Team</a></li><li><a shape="rect" class="external-link" href="http://camel-extra.googlecode.com/" rel="nofollow">Camel Extra</a></li></ul><h3 id="Navigation-Developers"><a shape="rect" href="developers.html">Developers</a></h3><ul class="alternate"
 ><li><a shape="rect" href="developers.html">Developer Guide</a></li><li><a shape="rect" href="source.html">Source</a></li><li><a shape="rect" href="building.html">Building</a></li><li><a shape="rect" href="javadoc.html">JavaDoc</a></li><li><a shape="rect" href="irc-room.html">IRC Room</a></li></ul><h3 id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul class="alternate"><li><a shape="rect" class="external-link" href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect" class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a shape="rect" class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a shape="rect" class="external-link" href="http://www.apache.org/security/">Security</a></li></ul></div>
+                <!-- NavigationBar -->
+            </div>
+          </div>
+        </td>
+        </tr>
+	</tbody>
+        </table>
+
+
+        <div class="bottom_red_bar"></div>
+      </div>
+    </div>
+  </div>
+</div>
+<div class="black_box">
+<div class="footer">
+  <div class="footer_l">
+    <div class="footer_r">
+      <div>
+        <a href="$base/privacy-policy.html">Privacy Policy</a> -
+        (<a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=45877614">edit page</a>)
+   	 (<a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=45877614&amp;showComments=true&amp;showCommentArea=true#addcomment">add comment</a>)
+      </div>
+    </div>
+  </div>
+</div>
+</div>
+</div>
+<div class="design_attribution">
+&copy; 2004-2014 The Apache Software Foundation.
+<br>          
+Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation.  All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+<br>
+<a href="http://hiramchirino.com">Graphic Design By Hiram</a>
+</div>
+
+<!-- Camel committers that would like access to the Analytics, send a note to private@camel.apache.org -->
+<script type="text/javascript">
+
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-25976253-1']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+
+</script>
+
+</body>
+</html>
+
+

Added: websites/production/camel/content/olingo2.html
==============================================================================
--- websites/production/camel/content/olingo2.html (added)
+++ websites/production/camel/content/olingo2.html Thu Sep 11 10:19:20 2014
@@ -0,0 +1,165 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<html>
+<head>
+    <link href="//camel.apache.org/styles/site.css" rel="stylesheet" type="text/css">
+    <link href="//camel.apache.org/styles/type-settings.css" rel="stylesheet" type="text/css">
+    <script src="//camel.apache.org/styles/prototype.js" type="text/javascript"></script>
+    <script src="//camel.apache.org/styles/rico.js" type="text/javascript"></script>    
+    <script src="//camel.apache.org/styles/site.js" type="text/javascript"></script>
+
+    <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
+
+    <style type="text/css">
+      .maincontent { overflow:hidden; }
+    </style>
+    <!--[if IE]>
+    <style type="text/css">
+      .maincontent { width:100%; }
+    </style>
+    <![endif]-->
+
+
+  <link href='//camel.apache.org/styles/highlighter/styles/shCoreCamel.css' rel='stylesheet' type='text/css' />
+  <link href='//camel.apache.org/styles/highlighter/styles/shThemeCamel.css' rel='stylesheet' type='text/css' />
+  <script src='//camel.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  
+  <script type="text/javascript">
+  SyntaxHighlighter.defaults['toolbar'] = false;
+  SyntaxHighlighter.all();
+  </script>
+
+    <title>
+    Apache Camel: Olingo2
+    </title>
+</head>
+<body>
+<div class="white_box">
+<div class="header">
+  <div class="header_l">
+    <div class="header_r">
+    </div>
+  </div>
+</div>
+<div class="content">
+  <div class="content_l">
+    <div class="content_r">
+      <div>
+          <!-- Banner -->
+<div id="banner-content"><div id="asf_logo">
+	<div id="activemq_logo" style="height:108px; background:transparent url(banner.data/apache-camel-7.png) no-repeat scroll left top;">
+            <a shape="rect" style="float:left; width:310px;display:block;text-indent:-5000px;text-decoration:none;line-height:140px; margin-top:20px; margin-left:18px;" href="http://camel.apache.org/">Camel</a>
+            <a shape="rect" style="float:right; width:180px;display:block;text-indent:-5000px;text-decoration:none;line-height:80px; margin-top:45px; margin-right:10px;" href="http://www.apache.org">Apache</a>
+	</div>
+</div></div>
+          <!-- Banner -->
+        <div class="top_red_bar">
+          <div id="site-breadcrumbs">
+                <!-- Breadcrumbs -->
+<a href="index.html">Apache Camel</a>&nbsp;&gt;&nbsp;<a href="documentation.html">Documentation</a>&nbsp;&gt;&nbsp;<a href="components.html">Components</a>&nbsp;&gt;&nbsp;<a href="olingo2.html">Olingo2</a>
+          </div>
+          <!-- Quicklinks -->
+<div id="site-quicklinks"><p><a shape="rect" href="download.html">Download</a> | <a shape="rect" href="javadoc.html">JavaDoc</a> | <a shape="rect" href="source.html">Source</a> | <a shape="rect" href="discussion-forums.html">Forums</a> | <a shape="rect" href="support.html">Support</a></p></div>
+          <!-- Quicklinks -->
+        </div>
+
+	<table border="0">
+	<tbody>
+        <tr>
+        <td valign="top" width="100%">
+<div class="wiki-content maincontent"><h2 id="Olingo2-Olingo2Component">Olingo2 Component</h2><p><strong>Available as of Camel 2.14</strong></p><p>The Olingo2 component utilizes&#160;<a shape="rect" class="external-link" href="http://olingo.apache.org/">Apache Olingo</a> version 2.0&#160;APIs to interact with OData 2.0 and 3.0 compliant services. A number of popular commercial and enterprise vendors and products support the OData protocol. A sample list of supporting products can be found on the OData <a shape="rect" class="external-link" href="http://www.odata.org/ecosystem/" rel="nofollow">website</a>.</p><p>The Olingo2 component supports reading feeds, delta feeds, entities, simple and complex properties, links, counts, using custom and OData system query parameters. It supports updating entities, properties, and association links. It also supports submitting queries and change requests as a single OData batch operation.&#160;</p><p>The component supports configuring HTTP connect
 ion parameters and headers for OData service connection. This allows configuring&#160;use of SSL, OAuth2.0, etc. as required by the target OData service.&#160;</p><p>Maven users will need to add the following dependency to their pom.xml for this component:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[	&lt;dependency&gt;
+    	&lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+    	&lt;artifactId&gt;camel-olingo2&lt;/artifactId&gt;
+    	&lt;version&gt;${camel-version}&lt;/version&gt;
+	&lt;/dependency&gt;
+]]></script>
+</div></div><h3 id="Olingo2-URIformat">URI format</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[    olingo2://endpoint/&lt;resource-path&gt;?[options]]]></script>
+</div></div><h3 id="Olingo2-Olingo2Component.1">Olingo2Component</h3><p>The Olingo2 Component can be configured with the options below. These options can be provided using the component's bean property&#160;<strong><code>configuration</code></strong>&#160;of type&#160;<strong><code>org.apache.camel.component.olingo2.Olingo2Configuration</code></strong>.&#160;</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Option</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th><th colspan="1" rowspan="1" class="confluenceTh">Description</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">serviceUri</td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">Target OData service base URI, e.g. <a shape="rect" class="external-link" href="http://services.odata.org/OData/OData.svc/Products?$orderby=Rating" rel="nofollow">http://services.odata.org/OData/OData.
 svc</a></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">contentType</td><td colspan="1" rowspan="1" class="confluenceTd">String</td><td colspan="1" rowspan="1" class="confluenceTd">Content-Type header value can be used to specify JSON or XML message format<span>, defaults to </span><strong>application/json;charset=utf-8</strong></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">connectTimeout</td><td colspan="1" rowspan="1" class="confluenceTd">int</td><td colspan="1" rowspan="1" class="confluenceTd">HTTP connection creation timeout in milliseconds, defaults to 30,000 (30 seconds)</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">socketTimeout</td><td colspan="1" rowspan="1" class="confluenceTd">int</td><td colspan="1" rowspan="1" class="confluenceTd">HTTP request timeout in milliseconds, defaults to 30,000 (30 seconds)</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">httpHeaders</td><td colspan="1" rowspan="1" class="confluenceTd">
 java.util.Map&lt;String, String&gt;</td><td colspan="1" rowspan="1" class="confluenceTd">Custom HTTP headers to inject into every request, this could include OAuth tokens, etc.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">proxy</td><td colspan="1" rowspan="1" class="confluenceTd">org.apache.http.HttpHost</td><td colspan="1" rowspan="1" class="confluenceTd">HTTP proxy server configuration</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">sslContext</td><td colspan="1" rowspan="1" class="confluenceTd">javax.net.ssl.SSLContext</td><td colspan="1" rowspan="1" class="confluenceTd">HTTP SSL configuration</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">httpAsyncClientBuilder</td><td colspan="1" rowspan="1" class="confluenceTd">org.apache.http.impl.nio.client.HttpAsyncClientBuilder</td><td colspan="1" rowspan="1" class="confluenceTd">Custom HTTP async client builder for more complex HTTP client configuration, overrides connectionTimeout, socketTime
 out, proxy and sslContext. Note that a socketTimeout <strong>MUST</strong> be specified in the builder, otherwise OData requests could block indefinitely</td></tr></tbody></table></div><h3 id="Olingo2-ProducerEndpoints">Producer Endpoints</h3><p>Producer endpoints can use endpoint names and options listed next.&#160;<span style="line-height: 1.4285715;">Producer endpoints can also use a special option&#160;</span><strong style="line-height: 1.4285715;"><code>inBody</code></strong><span style="line-height: 1.4285715;">&#160;that in turn should contain the name of the endpoint option whose value will be contained in the Camel Exchange In message. The <strong>inBody</strong>&#160;option defaults to <strong>data</strong>&#160;for endpoints that take that&#160;option.&#160;</span></p><p>Any of the endpoint options can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format&#160;<strong><code>CamelOlingo2.&lt;option&gt;</co
 de></strong>. Note that the&#160;<strong><code>inBody</code></strong>&#160;option overrides message header, i.e. the endpoint option&#160;<strong><code>inBody=option</code></strong>&#160;would override a&#160;<strong><code>CamelOlingo2.option</code></strong>&#160;header. In addition, query parameters can be specified&#160;</p><p>Note that the resourcePath option can either in specified in the URI as a part of the URI path, as an endpoint option ?resourcePath=&lt;resource-path&gt; or as a header value CamelOlingo2.resourcePath. The OData entity key predicate can either be a part of the resource path, e.g. <em>Manufacturers('1')</em>, where <em>'</em><em>1'</em>&#160;is the key predicate, or be specified separately with resource path <em>Manufacturers</em>&#160;and keyPredicate option <em>'1'</em>.&#160;</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Endpoint</th><th colspan="1" rowspan="1" class="confluenceTh">Opt
 ions</th><th colspan="1" rowspan="1" class="confluenceTh">Result Body Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">batch</td><td colspan="1" rowspan="1" class="confluenceTd">data</td><td colspan="1" rowspan="1" class="confluenceTd"><pre>java.util.List&lt;org.apache.camel.component.olingo2.api.batch.Olingo2BatchResponse&gt;</pre></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">create</td><td colspan="1" rowspan="1" class="confluenceTd">data, resourcePath</td><td colspan="1" rowspan="1" class="confluenceTd"><pre>org.apache.olingo.odata2.api.ep.entry.ODataEntry</pre></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">delete</td><td colspan="1" rowspan="1" class="confluenceTd">resourcePath</td><td colspan="1" rowspan="1" class="confluenceTd"><pre>org.apache.olingo.odata2.api.commons.HttpStatusCodes</pre></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">merge</td><td colspan="1" rowspan="1" class="confluenceTd">data, resourcePat
 h</td><td colspan="1" rowspan="1" class="confluenceTd"><pre>org.apache.olingo.odata2.api.commons.HttpStatusCodes</pre></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">patch</td><td colspan="1" rowspan="1" class="confluenceTd">data, resourcePath</td><td colspan="1" rowspan="1" class="confluenceTd"><pre>org.apache.olingo.odata2.api.commons.HttpStatusCodes</pre></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">read</td><td colspan="1" rowspan="1" class="confluenceTd">queryParams, resourcePath</td><td colspan="1" rowspan="1" class="confluenceTd"><p>Depends on OData resource being queried as described next</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">update</td><td colspan="1" rowspan="1" class="confluenceTd">data, resourcePath</td><td colspan="1" rowspan="1" class="confluenceTd"><pre>org.apache.olingo.odata2.api.commons.HttpStatusCodes</pre></td></tr></tbody></table></div><h3 id="Olingo2-ODataResourceTypeMapping">OData Resource Type Mappin
 g</h3><p>The result of <strong>read</strong> endpoint and data type of <strong>data</strong> option depends on the OData resource being queried, created or modified.&#160;</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">OData Resource Type</th><th colspan="1" rowspan="1" class="confluenceTh">Resource URI from resourcePath and keyPredicate</th><th colspan="1" rowspan="1" class="confluenceTh">In or Out Body Type</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Entity data model</td><td colspan="1" rowspan="1" class="confluenceTd">$metadata</td><td colspan="1" rowspan="1" class="confluenceTd"><pre>org.apache.olingo.odata2.api.edm.Edm</pre></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Service document</td><td colspan="1" rowspan="1" class="confluenceTd">/</td><td colspan="1" rowspan="1" class="confluenceTd"><pre>org.apache.olingo.odata2.api.servicedocument.ServiceDocument</pre></td></tr><
 tr><td colspan="1" rowspan="1" class="confluenceTd">OData feed</td><td colspan="1" rowspan="1" class="confluenceTd">&lt;entity-set&gt;</td><td colspan="1" rowspan="1" class="confluenceTd"><pre>org.apache.olingo.odata2.api.ep.feed.ODataFeed</pre></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">OData entry</td><td colspan="1" rowspan="1" class="confluenceTd">&lt;entity-set&gt;(&lt;key-predicate&gt;)</td><td colspan="1" rowspan="1" class="confluenceTd"><pre>org.apache.olingo.odata2.api.ep.entry.ODataEntry for Out body (response) and java.util.Map&lt;String, Object&gt; for In body (request)</pre></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Simple property</td><td colspan="1" rowspan="1" class="confluenceTd">&lt;entity-set&gt;(&lt;key-predicate&gt;)/&lt;simple-property&gt;</td><td colspan="1" rowspan="1" class="confluenceTd">Appropriate Java data type as described by <a shape="rect" class="external-link" href="http://olingo.apache.org/javadoc/odata2/index.
 html?org/apache/olingo/odata2/api/edm/class-use/EdmProperty.html">Olingo EdmProperty</a></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Simple property value</td><td colspan="1" rowspan="1" class="confluenceTd">&lt;entity-set&gt;(&lt;key-predicate&gt;)/&lt;simple-property&gt;/$value</td><td colspan="1" rowspan="1" class="confluenceTd"><span>Appropriate Java data type as described by </span><a shape="rect" class="external-link" href="http://olingo.apache.org/javadoc/odata2/index.html?org/apache/olingo/odata2/api/edm/class-use/EdmProperty.html">Olingo EdmProperty</a></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Complex property</td><td colspan="1" rowspan="1" class="confluenceTd"><span>&lt;entity-set&gt;(&lt;key-predicate&gt;)/&lt;complex-property&gt;</span></td><td colspan="1" rowspan="1" class="confluenceTd"><pre>java.util.Map&lt;String, Object&gt;</pre></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Zero or one association link</td><td
  colspan="1" rowspan="1" class="confluenceTd">&lt;entity-set&gt;(&lt;key-predicate&gt;/$link/&lt;one-to-one-entity-set-property&gt;</td><td colspan="1" rowspan="1" class="confluenceTd"><pre>String</pre></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Zero or many association links</td><td colspan="1" rowspan="1" class="confluenceTd"><span>&lt;entity-set&gt;(&lt;key-predicate&gt;/$link/&lt;one-to-many-entity-set-property&gt;</span></td><td colspan="1" rowspan="1" class="confluenceTd"><pre>java.util.List&lt;String&gt;</pre></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">Count</td><td colspan="1" rowspan="1" class="confluenceTd">&lt;resource-uri&gt;/$count</td><td colspan="1" rowspan="1" class="confluenceTd"><pre>java.lang.Long</pre></td></tr></tbody></table></div><h3 id="Olingo2-URIOptions">URI Options</h3><p>If a value is not provided for <strong>queryParams</strong> either in the endpoint URI or in a message header, it will be assumed to be&#160;<strong>
 <code>null</code></strong>. Note that the&#160;<strong><code>null</code></strong>&#160;value will only be used if other options do not satisfy matching endpoints.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Name</th><th colspan="1" rowspan="1" class="confluenceTh">Type</th><th colspan="1" rowspan="1" class="confluenceTh">Description</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">data</td><td colspan="1" rowspan="1" class="confluenceTd"><pre>Object</pre></td><td colspan="1" rowspan="1" class="confluenceTd">Data with appropriate type used to create or modify the OData resource</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">keyPredicate</td><td colspan="1" rowspan="1" class="confluenceTd"><pre>String</pre></td><td colspan="1" rowspan="1" class="confluenceTd">Key predicate to create a parameterized OData resource endpoint. Useful for create/update operations where the key predicate va
 lue is dynamically provided in a header</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">queryParams</td><td colspan="1" rowspan="1" class="confluenceTd"><pre>java.util.Map&lt;String, String&gt;</pre></td><td colspan="1" rowspan="1" class="confluenceTd">OData system options and custom query options. For more information see <a shape="rect" class="external-link" href="http://www.odata.org/documentation/odata-version-2-0/uri-conventions" rel="nofollow">OData 2.0 URI Conventions</a></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">resourcePath</td><td colspan="1" rowspan="1" class="confluenceTd"><pre>String</pre></td><td colspan="1" rowspan="1" class="confluenceTd">OData resource path, may or may not contain key predicate</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">*</td><td colspan="1" rowspan="1" class="confluenceTd"><pre>String</pre></td><td colspan="1" rowspan="1" class="confluenceTd">Any other URI option is treated as a query parameter a
 nd added to query parameter map, overwriting entries in a <strong>queryParams</strong> option, if also specified</td></tr></tbody></table></div><h3 id="Olingo2-ConsumerEndpoints">Consumer Endpoints</h3><p>Only the <strong>read</strong> endpoint can be used as a consumer endpoint. Consumer endpoints can use&#160;<a shape="rect" class="external-link" href="http://camel.apache.org/polling-consumer.html#PollingConsumer-ScheduledPollConsumerOptions">Scheduled Poll Consumer Options</a>&#160;with a&#160;<strong><code>consumer.</code></strong>&#160;prefix to schedule endpoint invocation. By default consumer endpoints that return an array or collection will generate one exchange per element, and their routes will be executed once for each exchange. This behavior can be disabled by setting the endpoint property <strong>consumer.splitResult=false</strong>.&#160;</p><h3 id="Olingo2-MessageHeaders">Message Headers</h3><p>Any URI option can be provided in a message header for producer endpoints w
 ith a&#160;<strong><code>CamelOlingo2.</code></strong>&#160;prefix.</p><h3 id="Olingo2-MessageBody">Message Body</h3><p>All result message bodies utilize objects provided by the underlying <a shape="rect" class="external-link" href="http://olingo.apache.org/javadoc/odata2/index.html">Apache Olingo 2.0 API</a> used by the Olingo2Component. Producer endpoints can specify the option name for incoming message body in the&#160;<strong><code>inBody</code></strong>&#160;endpoint URI parameter. For endpoints that return an array or collection, a consumer endpoint will map every element to distinct messages, unless <strong>consumer.splitResult</strong> is set to <strong>false</strong>.</p><h3 id="Olingo2-Usecases"><span style="font-size: 16.0px;line-height: 1.5625;">Use cases</span></h3><div class="wiki-content"><p>The following route reads top 5 entries from the Manufacturer feed ordered by ascending Name property.&#160;</p><div class="syntaxhighlighter nogutter java"><p>&#160;</p><div clas
 s="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><div class="container" title="Hint: double-click to select code"><div class="line number1 index0 alt2"><code class="java plain">from(</code><code class="java string">"direct:..."</code><code class="java plain">)</code></div><div class="line number1 index0 alt2"><code class="java spaces">&#160;&#160;&#160;&#160;</code><code class="java plain">.setHeader("CamelOlingo2.$top", "5"</code><code class="java plain">);</code></div><div class="line number1 index0 alt2"><code class="java spaces" style="line-height: 1.4285715;">&#160;&#160;&#160;&#160;</code><code class="java plain" style="line-height: 1.4285715;">.to(</code><code class="java string" style="line-height: 1.4285715;">"<a shape="rect" href="box://files/upload/inBody=fileUploadRequest" rel="nofollow">olingo2://read/Manufacturers?</a>orderBy=Name%20asc"</code><code class="java plain" style="line-height: 1.4285715;">);</code></di
 v></div></td></tr></tbody></table></div><p>&#160;</p></div><p>The following route reads Manufacturer entry using the key property value in incoming&#160;<strong>id</strong> header.&#160;</p><div class="syntaxhighlighter nogutter java"><p>&#160;</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><div class="container" title="Hint: double-click to select code"><div class="line number1 index0 alt2"><code class="java plain">from(</code><code class="java string">"direct:..."</code><code class="java plain">)</code></div><div class="line number1 index0 alt2"><code class="java spaces">&#160;&#160;&#160;&#160;</code><code class="java plain">.setHeader("<span>C</span><span>amelOlingo2.keyPredicate</span>", <span>header("id")</span></code><code class="java plain">)</code></div><div class="line number2 index1 alt1"><code class="java spaces">&#160;&#160;&#160;&#160;</code><code class="java plain">.to(</code><code class="java stri
 ng">"<a shape="rect" href="box://files/upload/inBody=fileUploadRequest" rel="nofollow">olingo2://read/M</a>anufacturers"</code><code class="java plain">);</code></div></div></td></tr></tbody></table></div><p>The following route creates Manufacturer entry using the <strong>java.util.Map&lt;String, Object&gt;</strong> in body message.&#160;</p><div class="syntaxhighlighter nogutter java"><p>&#160;</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><div class="container" title="Hint: double-click to select code"><div class="line number1 index0 alt2"><code class="java plain">from(</code><code class="java string">"direct:..."</code><code class="java plain">)</code></div><div class="line number1 index0 alt2"><code class="java spaces" style="line-height: 1.4285715;">&#160;&#160;&#160;&#160;</code><code class="java plain" style="line-height: 1.4285715;">.to(</code><code class="java string" style="line-height: 1.4285715;">"<a
  shape="rect" href="box://files/upload/inBody=fileUploadRequest" rel="nofollow">olingo2://create/M</a>anufacturers"</code><code class="java plain" style="line-height: 1.4285715;">);</code></div></div></td></tr></tbody></table></div><p>&#160;</p></div></div><p>The following route polls Manufacturer <a shape="rect" class="external-link" href="http://olingo.apache.org/doc/tutorials/deltaClient.html">delta feed</a>&#160;every 30 seconds. The bean <strong>blah</strong>&#160;updates the bean&#160;<strong>paramsBean</strong>&#160;to add an updated&#160;<strong>!deltatoken</strong> property with the value returned in the <strong>ODataDeltaFeed</strong> result. Since the initial delta token is not known, the consumer endpoint will produce an&#160;<strong>ODataFeed</strong> value the first time, and <strong>ODataDeltaFeed</strong> on subsequent polls.&#160;</p><div class="syntaxhighlighter nogutter java"><p>&#160;</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspa
 n="1" rowspan="1" class="confluenceTd"><div class="container" title="Hint: double-click to select code"><div class="line number1 index0 alt2"><code class="java plain">from(</code><code class="java string">"<a shape="rect" rel="nofollow">olingo2://read/Manufacturers?queryParams=#paramsBean&amp;consumer.timeUnit=SECONDS&amp;consumer.delay=30</a>"</code><code class="java plain">)</code></div><div class="line number2 index1 alt1"><code class="java spaces">&#160;&#160;&#160;&#160;</code><code class="java plain">.to(</code><code class="java string">"<a shape="rect" class="external-link" href="http://beanblah" rel="nofollow">bean:blah</a>"</code><code class="java plain">);</code></div></div></td></tr></tbody></table></div></div></div></div>
+        </td>
+        <td valign="top">
+          <div class="navigation">
+            <div class="navigation_top">
+                <!-- NavigationBar -->
+<div class="navigation_bottom" id="navigation_bottom"><h3 id="Navigation-Overview"><a shape="rect" href="overview.html">Overview</a></h3><ul class="alternate"><li><a shape="rect" href="index.html">Home</a></li><li><a shape="rect" href="download.html">Download</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li><li><a shape="rect" href="faq.html">FAQ</a></li></ul><h3 id="Navigation-Documentation"><a shape="rect" href="documentation.html">Documentation</a></h3><ul class="alternate"><li><a shape="rect" href="user-guide.html">User Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a shape="rect" href="books.html">Books</a></li><li><a shape="rect" href="tutorials.html">Tutorials</a></li><li><a shape="rect" href="examples.html">Examples</a></li><li><a shape="rect" href="cookbook.html">Cookbook</a></li><li><a shape="rect" href="architecture.html">Architecture</a></li><li><a shape="rect" href="enterprise-integration-patterns.html">Enterprise
  Integration Patterns</a></li><li><a shape="rect" href="dsl.html">DSL</a></li><li><a shape="rect" href="components.html">Components</a></li><li><a shape="rect" href="data-format.html">Data Format</a></li><li><a shape="rect" href="languages.html">Languages</a></li><li><a shape="rect" href="security.html">Security</a></li><li><a shape="rect" href="security-advisories.html">Security Advisories</a></li></ul><h3 id="Navigation-Search">Search</h3><form enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box" action="http://www.google.com/cse">
+  <div>
+    <input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq">
+    <input type="hidden" name="ie" value="UTF-8">
+    <input type="text" name="q" size="21">
+    <input type="submit" name="sa" value="Search">
+  </div>
+</form>
+<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script><h3 id="Navigation-Community"><a shape="rect" href="community.html">Community</a></h3><ul class="alternate"><li><a shape="rect" href="support.html">Support</a></li><li><a shape="rect" href="contributing.html">Contributing</a></li><li><a shape="rect" href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect" href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect" href="user-stories.html">User Stories</a></li><li><a shape="rect" href="news.html">News</a></li><li><a shape="rect" href="articles.html">Articles</a></li><li><a shape="rect" href="site.html">Site</a></li><li><a shape="rect" href="team.html">Team</a></li><li><a shape="rect" class="external-link" href="http://camel-extra.googlecode.com/" rel="nofollow">Camel Extra</a></li></ul><h3 id="Navigation-Developers"><a shape="rect" href="developers.html">Developers</a></h3><ul class="alternate"
 ><li><a shape="rect" href="developers.html">Developer Guide</a></li><li><a shape="rect" href="source.html">Source</a></li><li><a shape="rect" href="building.html">Building</a></li><li><a shape="rect" href="javadoc.html">JavaDoc</a></li><li><a shape="rect" href="irc-room.html">IRC Room</a></li></ul><h3 id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul class="alternate"><li><a shape="rect" class="external-link" href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect" class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a shape="rect" class="external-link" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a shape="rect" class="external-link" href="http://www.apache.org/security/">Security</a></li></ul></div>
+                <!-- NavigationBar -->
+            </div>
+          </div>
+        </td>
+        </tr>
+	</tbody>
+        </table>
+
+
+        <div class="bottom_red_bar"></div>
+      </div>
+    </div>
+  </div>
+</div>
+<div class="black_box">
+<div class="footer">
+  <div class="footer_l">
+    <div class="footer_r">
+      <div>
+        <a href="$base/privacy-policy.html">Privacy Policy</a> -
+        (<a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=45876879">edit page</a>)
+   	 (<a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=45876879&amp;showComments=true&amp;showCommentArea=true#addcomment">add comment</a>)
+      </div>
+    </div>
+  </div>
+</div>
+</div>
+</div>
+<div class="design_attribution">
+&copy; 2004-2014 The Apache Software Foundation.
+<br>          
+Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation.  All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+<br>
+<a href="http://hiramchirino.com">Graphic Design By Hiram</a>
+</div>
+
+<!-- Camel committers that would like access to the Analytics, send a note to private@camel.apache.org -->
+<script type="text/javascript">
+
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-25976253-1']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+
+</script>
+
+</body>
+</html>
+
+



Mime
View raw message