Repository: camel
Updated Branches:
  refs/heads/master c03292d9b -> a37a29512


Component docs


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a37a2951
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a37a2951
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a37a2951

Branch: refs/heads/master
Commit: a37a295129a0c5fbd5d974eeb60d3e99c453faff
Parents: c03292d
Author: Claus Ibsen <davscl...@apache.org>
Authored: Thu May 21 10:26:21 2015 +0200
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Thu May 21 10:26:21 2015 +0200

----------------------------------------------------------------------
 .../camel/component/netty4/NettyComponent.java  |  14 +-
 .../component/netty4/NettyConfiguration.java    | 141 ++++++++++++++++---
 .../NettyServerBootstrapConfiguration.java      | 130 +++++++++++++++--
 3 files changed, 249 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/a37a2951/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyComponent.java
----------------------------------------------------------------------
diff --git 
a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyComponent.java
 
b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyComponent.java
index 66ba640..4fc7b75 100644
--- 
a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyComponent.java
+++ 
b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyComponent.java
@@ -87,24 +87,26 @@ public class NettyComponent extends UriEndpointComponent {
         return configuration;
     }
 
+    /**
+     * To use the NettyConfiguration as configuration when creating endpoints.
+     */
     public void setConfiguration(NettyConfiguration configuration) {
         this.configuration = configuration;
     }
-    
+
+    /**
+     * To use the given EventExecutorGroup
+     */
     public void setExecutorService(EventExecutorGroup executorService) {
         this.executorService = executorService;
     }
 
-    public synchronized EventExecutorGroup getExecutorService() {
-        if (executorService == null) {
-            executorService = createExecutorService();
-        }
+    public EventExecutorGroup getExecutorService() {
         return executorService;
     }
 
     @Override
     protected void doStart() throws Exception {
-        
         if (configuration == null) {
             configuration = new NettyConfiguration();
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/a37a2951/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyConfiguration.java
----------------------------------------------------------------------
diff --git 
a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyConfiguration.java
 
b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyConfiguration.java
index af19e61..de8dff2 100644
--- 
a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyConfiguration.java
+++ 
b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyConfiguration.java
@@ -42,7 +42,7 @@ import org.slf4j.LoggerFactory;
 public class NettyConfiguration extends NettyServerBootstrapConfiguration 
implements Cloneable {
     private static final Logger LOG = 
LoggerFactory.getLogger(NettyConfiguration.class);
 
-    @UriParam
+    @UriParam(label = "producer")
     private long requestTimeout;
     @UriParam(defaultValue = "true")
     private boolean sync = true;
@@ -60,41 +60,41 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
     private List<ChannelHandler> decoders = new ArrayList<ChannelHandler>();
     @UriParam
     private boolean disconnect;
-    @UriParam(defaultValue = "true")
+    @UriParam(label = "producer", defaultValue = "true")
     private boolean lazyChannelCreation = true;
     @UriParam
     private boolean transferExchange;
-    @UriParam(defaultValue = "true")
+    @UriParam(label = "consumer", defaultValue = "true")
     private boolean disconnectOnNoReply = true;
-    @UriParam(defaultValue = "WARN")
+    @UriParam(label = "consumer", defaultValue = "WARN")
     private LoggingLevel noReplyLogLevel = LoggingLevel.WARN;
-    @UriParam(defaultValue = "WARN")
+    @UriParam(label = "consumer", defaultValue = "WARN")
     private LoggingLevel serverExceptionCaughtLogLevel = LoggingLevel.WARN;
-    @UriParam(defaultValue = "DEBUG")
+    @UriParam(label = "consumer", defaultValue = "DEBUG")
     private LoggingLevel serverClosedChannelExceptionCaughtLogLevel = 
LoggingLevel.DEBUG;
     @UriParam(defaultValue = "true")
     private boolean allowDefaultCodec = true;
-    @UriParam
+    @UriParam(label = "producer")
     private ClientInitializerFactory clientInitializerFactory;
     @UriParam(defaultValue = "16")
     private int maximumPoolSize = 16;
-    @UriParam(defaultValue = "true")
+    @UriParam(label = "consumer", defaultValue = "true")
     private boolean usingExecutorService = true;
-    @UriParam(defaultValue = "-1")
+    @UriParam(label = "producer", defaultValue = "-1")
     private int producerPoolMaxActive = -1;
-    @UriParam
+    @UriParam(label = "producer")
     private int producerPoolMinIdle;
-    @UriParam(defaultValue = "100")
+    @UriParam(label = "producer", defaultValue = "100")
     private int producerPoolMaxIdle = 100;
-    @UriParam(defaultValue = "" + 5 * 60 * 1000L)
+    @UriParam(label = "producer", defaultValue = "" + 5 * 60 * 1000L)
     private long producerPoolMinEvictableIdle = 5 * 60 * 1000L;
-    @UriParam(defaultValue = "true")
+    @UriParam(label = "producer", defaultValue = "true")
     private boolean producerPoolEnabled = true;
-    @UriParam
+    @UriParam(label = "producer")
     private boolean udpConnectionlessSending;
-    @UriParam
+    @UriParam(label = "consumer")
     private boolean clientMode;
-    @UriParam
+    @UriParam(label = "producer")
     private boolean useByteBuf;
     @UriParam
     private boolean udpByteArrayCodec;
@@ -252,6 +252,11 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return requestTimeout;
     }
 
+    /**
+     * Allows to use a timeout for the Netty producer when calling a remote 
server.
+     * By default no timeout is in use. The value is in milli seconds, so eg 
30000 is 30 seconds.
+     * The requestTimeout is using Netty's ReadTimeoutHandler to trigger the 
timeout.
+     */
     public void setRequestTimeout(long requestTimeout) {
         this.requestTimeout = requestTimeout;
     }
@@ -260,6 +265,9 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return sync;
     }
 
+    /**
+     * Setting to set endpoint as one-way or request-response
+     */
     public void setSync(boolean sync) {
         this.sync = sync;
     }
@@ -268,6 +276,10 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return textline;
     }
 
+    /**
+     * 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.
+     */
     public void setTextline(boolean textline) {
         this.textline = textline;
     }
@@ -276,6 +288,9 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return decoderMaxLineLength;
     }
 
+    /**
+     * The max line length to use for the textline codec.
+     */
     public void setDecoderMaxLineLength(int decoderMaxLineLength) {
         this.decoderMaxLineLength = decoderMaxLineLength;
     }
@@ -284,6 +299,9 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return delimiter;
     }
 
+    /**
+     * The delimiter to use for the textline codec. Possible values are LINE 
and NULL.
+     */
     public void setDelimiter(TextLineDelimiter delimiter) {
         this.delimiter = delimiter;
     }
@@ -292,6 +310,9 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return autoAppendDelimiter;
     }
 
+    /**
+     * Whether or not to auto append missing end delimiter when sending using 
the textline codec.
+     */
     public void setAutoAppendDelimiter(boolean autoAppendDelimiter) {
         this.autoAppendDelimiter = autoAppendDelimiter;
     }
@@ -300,6 +321,9 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return encoding;
     }
 
+    /**
+     * The encoding (a charset name) to use for the textline codec. If not 
provided, Camel will use the JVM default Charset.
+     */
     public void setEncoding(String encoding) {
         this.encoding = encoding;
     }
@@ -308,6 +332,11 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return decoders;
     }
 
+    /**
+     * 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 Registry.
+     * Just remember to prefix the value with # so Camel knows it should 
lookup.
+     */
     public void setDecoders(List<ChannelHandler> decoders) {
         this.decoders = decoders;
     }
@@ -316,6 +345,10 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return encoders;
     }
 
+    /**
+     * 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 Registry.
+     * Just remember to prefix the value with # so Camel knows it should 
lookup.
+     */
     public void setEncoders(List<ChannelHandler> encoders) {
         this.encoders = encoders;
     }
@@ -324,6 +357,9 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return encoders.isEmpty() ? null : encoders.get(0);
     }
 
+    /**
+     * A custom ChannelHandler class that can be used to perform special 
marshalling of outbound payloads.
+     */
     public void setEncoder(ChannelHandler encoder) {
         if (!encoders.contains(encoder)) {
             encoders.add(encoder);
@@ -334,6 +370,9 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return decoders.isEmpty() ? null : decoders.get(0);
     }
 
+    /**
+     * A custom ChannelHandler class that can be used to perform special 
marshalling of inbound payloads.
+     */
     public void setDecoder(ChannelHandler decoder) {
         if (!decoders.contains(decoder)) {
             decoders.add(decoder);
@@ -344,6 +383,9 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return disconnect;
     }
 
+    /**
+     * Whether or not to disconnect(close) from Netty Channel right after use. 
Can be used for both consumer and producer.
+     */
     public void setDisconnect(boolean disconnect) {
         this.disconnect = disconnect;
     }
@@ -352,6 +394,9 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return lazyChannelCreation;
     }
 
+    /**
+     * Channels can be lazily created to avoid exceptions, if the remote 
server is not up and running when the Camel producer is started.
+     */
     public void setLazyChannelCreation(boolean lazyChannelCreation) {
         this.lazyChannelCreation = lazyChannelCreation;
     }
@@ -360,6 +405,12 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return transferExchange;
     }
 
+    /**
+     * 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.
+     */
     public void setTransferExchange(boolean transferExchange) {
         this.transferExchange = transferExchange;
     }
@@ -368,6 +419,9 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return disconnectOnNoReply;
     }
 
+    /**
+     * If sync is enabled then this option dictates NettyConsumer if it should 
disconnect where there is no reply to send back.
+     */
     public void setDisconnectOnNoReply(boolean disconnectOnNoReply) {
         this.disconnectOnNoReply = disconnectOnNoReply;
     }
@@ -376,6 +430,9 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return noReplyLogLevel;
     }
 
+    /**
+     * If sync is enabled this option dictates NettyConsumer which logging 
level to use when logging a there is no reply to send back.
+     */
     public void setNoReplyLogLevel(LoggingLevel noReplyLogLevel) {
         this.noReplyLogLevel = noReplyLogLevel;
     }
@@ -384,6 +441,9 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return serverExceptionCaughtLogLevel;
     }
 
+    /**
+     * If the server (NettyConsumer) catches an exception then its logged 
using this logging level.
+     */
     public void setServerExceptionCaughtLogLevel(LoggingLevel 
serverExceptionCaughtLogLevel) {
         this.serverExceptionCaughtLogLevel = serverExceptionCaughtLogLevel;
     }
@@ -392,6 +452,10 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return serverClosedChannelExceptionCaughtLogLevel;
     }
 
+    /**
+     * If the server (NettyConsumer) catches an 
java.nio.channels.ClosedChannelException then its logged using this logging 
level.
+     * This is used to avoid logging the closed channel exceptions, as clients 
can disconnect abruptly and then cause a flood of closed exceptions in the 
Netty server.
+     */
     public void setServerClosedChannelExceptionCaughtLogLevel(LoggingLevel 
serverClosedChannelExceptionCaughtLogLevel) {
         this.serverClosedChannelExceptionCaughtLogLevel = 
serverClosedChannelExceptionCaughtLogLevel;
     }
@@ -400,6 +464,10 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return allowDefaultCodec;
     }
 
+    /**
+     * 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.
+     */
     public void setAllowDefaultCodec(boolean allowDefaultCodec) {
         this.allowDefaultCodec = allowDefaultCodec;
     }
@@ -424,6 +492,9 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return clientInitializerFactory;
     }
 
+    /**
+     * To use a custom ClientInitializerFactory
+     */
     public void setClientInitializerFactory(ClientInitializerFactory 
clientInitializerFactory) {
         this.clientInitializerFactory = clientInitializerFactory;
     }
@@ -432,6 +503,9 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return maximumPoolSize;
     }
 
+    /**
+     * The core pool size for the ordered thread pool, if its in use.
+     */
     public void setMaximumPoolSize(int maximumPoolSize) {
         this.maximumPoolSize = maximumPoolSize;
     }
@@ -440,6 +514,9 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return usingExecutorService;
     }
 
+    /**
+     * Whether to use ordered thread pool, to ensure events are processed 
orderly on the same channel.
+     */
     public void setUsingExecutorService(boolean usingExecutorService) {
         this.usingExecutorService = usingExecutorService;
     }
@@ -448,6 +525,10 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return producerPoolMaxActive;
     }
 
+    /**
+     * 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.
+     */
     public void setProducerPoolMaxActive(int producerPoolMaxActive) {
         this.producerPoolMaxActive = producerPoolMaxActive;
     }
@@ -456,6 +537,9 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return producerPoolMinIdle;
     }
 
+    /**
+     * Sets the minimum number of instances allowed in the producer pool 
before the evictor thread (if active) spawns new objects.
+     */
     public void setProducerPoolMinIdle(int producerPoolMinIdle) {
         this.producerPoolMinIdle = producerPoolMinIdle;
     }
@@ -464,6 +548,9 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return producerPoolMaxIdle;
     }
 
+    /**
+     * Sets the cap on the number of "idle" instances in the pool.
+     */
     public void setProducerPoolMaxIdle(int producerPoolMaxIdle) {
         this.producerPoolMaxIdle = producerPoolMaxIdle;
     }
@@ -472,6 +559,9 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return producerPoolMinEvictableIdle;
     }
 
+    /**
+     * 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.
+     */
     public void setProducerPoolMinEvictableIdle(long 
producerPoolMinEvictableIdle) {
         this.producerPoolMinEvictableIdle = producerPoolMinEvictableIdle;
     }
@@ -480,6 +570,10 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return producerPoolEnabled;
     }
 
+    /**
+     * Whether producer pool is enabled or not.
+     * Important: Do not turn this off, as the pooling is needed for handling 
concurrency and reliable request/reply.
+     */
     public void setProducerPoolEnabled(boolean producerPoolEnabled) {
         this.producerPoolEnabled = producerPoolEnabled;
     }
@@ -488,6 +582,10 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return udpConnectionlessSending;
     }
 
+    /**
+     * This option supports connection less udp sending which is a real fire 
and forget.
+     * A connected udp send receive the PortUnreachableException if no one is 
listen on the receiving port.
+     */
     public void setUdpConnectionlessSending(boolean udpConnectionlessSending) {
         this.udpConnectionlessSending = udpConnectionlessSending;
     }
@@ -495,7 +593,10 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
     public boolean isClientMode() {
         return clientMode;
     }
-    
+
+    /**
+     * If the clientMode is true, netty consumer will connect the address as a 
TCP client.
+     */
     public void setClientMode(boolean clientMode) {
         this.clientMode = clientMode;
     }
@@ -504,6 +605,9 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return useByteBuf;
     }
 
+    /**
+     * If the useByteBuf is true, netty producer will turn the message body 
into {@link ByteBuf} before sending it out.
+     */
     public void setUseByteBuf(boolean useByteBuf) {
         this.useByteBuf = useByteBuf;
     }
@@ -512,6 +616,9 @@ public class NettyConfiguration extends 
NettyServerBootstrapConfiguration implem
         return udpByteArrayCodec;
     }
 
+    /**
+     * For UDP only. If enabled the using byte array codec instead of Java 
serialization protocol.
+     */
     public void setUdpByteArrayCodec(boolean udpByteArrayCodec) {
         this.udpByteArrayCodec = udpByteArrayCodec;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/a37a2951/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyServerBootstrapConfiguration.java
----------------------------------------------------------------------
diff --git 
a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyServerBootstrapConfiguration.java
 
b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyServerBootstrapConfiguration.java
index 9dc4c40..0791408 100644
--- 
a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyServerBootstrapConfiguration.java
+++ 
b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyServerBootstrapConfiguration.java
@@ -31,13 +31,13 @@ import org.apache.camel.util.jsse.SSLContextParameters;
 public class NettyServerBootstrapConfiguration implements Cloneable {
     public static final String DEFAULT_ENABLED_PROTOCOLS = 
"TLSv1,TLSv1.1,TLSv1.2";
 
-    @UriPath @Metadata(required = "true")
+    @UriPath(enums = "tcp,udp") @Metadata(required = "true")
     protected String protocol;
     @UriPath @Metadata(required = "true")
     protected String host;
     @UriPath @Metadata(required = "true")
     protected int port;
-    @UriParam
+    @UriParam(label = "consumer")
     protected boolean broadcast;
     @UriParam(defaultValue = "65536")
     protected int sendBufferSize = 65536;
@@ -45,9 +45,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
     protected int receiveBufferSize = 65536;
     @UriParam
     protected int receiveBufferSizePredictor;
-    @UriParam(defaultValue = "1")
+    @UriParam(label = "consumer", defaultValue = "1")
     protected int bossCount = 1;
-    @UriParam
+    @UriParam(label = "consumer")
     protected int workerCount;
     @UriParam(defaultValue = "true")
     protected boolean keepAlive = true;
@@ -55,13 +55,13 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
     protected boolean tcpNoDelay = true;
     @UriParam(defaultValue = "true")
     protected boolean reuseAddress = true;
-    @UriParam(defaultValue = "10000")
+    @UriParam(label = "producer", defaultValue = "10000")
     protected int connectTimeout = 10000;
-    @UriParam
+    @UriParam(label = "consumer")
     protected int backlog;
-    @UriParam
+    @UriParam(label = "consumer")
     protected ServerInitializerFactory serverInitializerFactory;
-    @UriParam
+    @UriParam(label = "consumer")
     protected NettyServerBootstrapFactory nettyServerBootstrapFactory;
     protected Map<String, Object> options;
     // SSL options is also part of the server bootstrap as the server listener 
on port X is either plain or SSL
@@ -73,7 +73,7 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
     protected SslHandler sslHandler;
     @UriParam
     protected SSLContextParameters sslContextParameters;
-    @UriParam
+    @UriParam(label = "consumer")
     protected boolean needClientAuth;
     @UriParam
     protected File keyStoreFile;
@@ -95,7 +95,7 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
     protected EventLoopGroup bossGroup;
     @UriParam
     protected EventLoopGroup workerGroup;
-    @UriParam
+    @UriParam(label = "consumer")
     protected String networkInterface;
     
     public String getAddress() {
@@ -110,6 +110,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return protocol;
     }
 
+    /**
+     * The protocol to use which can be tcp or udp.
+     */
     public void setProtocol(String protocol) {
         this.protocol = protocol;
     }
@@ -118,6 +121,12 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return host;
     }
 
+    /**
+     * The hostname.
+     * <p/>
+     * For the consumer the hostname is localhost or 0.0.0.0
+     * For the producer the hostname is the remote host to connect to
+     */
     public void setHost(String host) {
         this.host = host;
     }
@@ -126,6 +135,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return port;
     }
 
+    /**
+     * The host port number
+     */
     public void setPort(int port) {
         this.port = port;
     }
@@ -134,6 +146,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return broadcast;
     }
 
+    /**
+     * Setting to choose Multicast over UDP
+     */
     public void setBroadcast(boolean broadcast) {
         this.broadcast = broadcast;
     }
@@ -142,6 +157,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return sendBufferSize;
     }
 
+    /**
+     * The TCP/UDP buffer sizes to be used during outbound communication. Size 
is bytes.
+     */
     public void setSendBufferSize(int sendBufferSize) {
         this.sendBufferSize = sendBufferSize;
     }
@@ -150,6 +168,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return receiveBufferSize;
     }
 
+    /**
+     * The TCP/UDP buffer sizes to be used during inbound communication. Size 
is bytes.
+     */
     public void setReceiveBufferSize(int receiveBufferSize) {
         this.receiveBufferSize = receiveBufferSize;
     }
@@ -158,6 +179,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return receiveBufferSizePredictor;
     }
 
+    /**
+     * Configures the buffer size predictor. See details at Jetty 
documentation and this mail thread.
+     */
     public void setReceiveBufferSizePredictor(int receiveBufferSizePredictor) {
         this.receiveBufferSizePredictor = receiveBufferSizePredictor;
     }
@@ -166,6 +190,10 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return workerCount;
     }
 
+    /**
+     * 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
+     */
     public void setWorkerCount(int workerCount) {
         this.workerCount = workerCount;
     }
@@ -174,6 +202,10 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return bossCount;
     }
 
+    /**
+     * When netty works on nio mode, it uses default bossCount parameter from 
Netty, which is 1.
+     * User can use this operation to override the default bossCount from Netty
+     */
     public void setBossCount(int bossCount) {
         this.bossCount = bossCount;
     }
@@ -182,6 +214,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return keepAlive;
     }
 
+    /**
+     * Setting to ensure socket is not closed due to inactivity
+     */
     public void setKeepAlive(boolean keepAlive) {
         this.keepAlive = keepAlive;
     }
@@ -190,6 +225,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return tcpNoDelay;
     }
 
+    /**
+     * Setting to improve TCP protocol performance
+     */
     public void setTcpNoDelay(boolean tcpNoDelay) {
         this.tcpNoDelay = tcpNoDelay;
     }
@@ -198,6 +236,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return reuseAddress;
     }
 
+    /**
+     * Setting to facilitate socket multiplexing
+     */
     public void setReuseAddress(boolean reuseAddress) {
         this.reuseAddress = reuseAddress;
     }
@@ -206,6 +247,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return connectTimeout;
     }
 
+    /**
+     * Time to wait for a socket connection to be available. Value is in 
millis.
+     */
     public void setConnectTimeout(int connectTimeout) {
         this.connectTimeout = connectTimeout;
     }
@@ -214,6 +258,12 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return backlog;
     }
 
+    /**
+     * 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 200, 500 or 1000, tells the TCP 
stack how long the "accept" queue can be
+     * If this option is not configured, then the backlog depends on OS 
setting.
+     */
     public void setBacklog(int backlog) {
         this.backlog = backlog;
     }
@@ -222,6 +272,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return ssl;
     }
 
+    /**
+     * Setting to specify whether SSL encryption is applied to this endpoint
+     */
     public void setSsl(boolean ssl) {
         this.ssl = ssl;
     }
@@ -230,6 +283,10 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return sslClientCertHeaders;
     }
 
+    /**
+     * When enabled and in SSL mode, then the Netty consumer will enrich the 
Camel Message with headers having
+     * information about the client certificate such as subject name, issuer 
name, serial number, and the valid date range.
+     */
     public void setSslClientCertHeaders(boolean sslClientCertHeaders) {
         this.sslClientCertHeaders = sslClientCertHeaders;
     }
@@ -238,6 +295,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return sslHandler;
     }
 
+    /**
+     * Reference to a class that could be used to return an SSL Handler
+     */
     public void setSslHandler(SslHandler sslHandler) {
         this.sslHandler = sslHandler;
     }
@@ -246,6 +306,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return sslContextParameters;
     }
 
+    /**
+     * To configure security using SSLContextParameters
+     */
     public void setSslContextParameters(SSLContextParameters 
sslContextParameters) {
         this.sslContextParameters = sslContextParameters;
     }
@@ -254,6 +317,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return needClientAuth;
     }
 
+    /**
+     * Configures whether the server needs client authentication when using 
SSL.
+     */
     public void setNeedClientAuth(boolean needClientAuth) {
         this.needClientAuth = needClientAuth;
     }
@@ -263,6 +329,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return keyStoreFile;
     }
 
+    /**
+     * Client side certificate keystore to be used for encryption
+     */
     @Deprecated
     public void setKeyStoreFile(File keyStoreFile) {
         this.keyStoreFile = keyStoreFile;
@@ -273,6 +342,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return trustStoreFile;
     }
 
+    /**
+     * Server side certificate keystore to be used for encryption
+     */
     @Deprecated
     public void setTrustStoreFile(File trustStoreFile) {
         this.trustStoreFile = trustStoreFile;
@@ -282,6 +354,10 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return keyStoreResource;
     }
 
+    /**
+     * Client side certificate keystore to be used for encryption. Is loaded 
by default from classpath,
+     * but you can prefix with "classpath:", "file:", or "http:" to load the 
resource from different systems.
+     */
     public void setKeyStoreResource(String keyStoreResource) {
         this.keyStoreResource = keyStoreResource;
     }
@@ -290,6 +366,10 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return trustStoreResource;
     }
 
+    /**
+     * Server side certificate keystore to be used for encryption.
+     * Is loaded by default from classpath, but you can prefix with 
"classpath:", "file:", or "http:" to load the resource from different systems.
+     */
     public void setTrustStoreResource(String trustStoreResource) {
         this.trustStoreResource = trustStoreResource;
     }
@@ -298,6 +378,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return keyStoreFormat;
     }
 
+    /**
+     * Keystore format to be used for payload encryption. Defaults to "JKS" if 
not set
+     */
     public void setKeyStoreFormat(String keyStoreFormat) {
         this.keyStoreFormat = keyStoreFormat;
     }
@@ -306,6 +389,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return securityProvider;
     }
 
+    /**
+     * Security provider to be used for payload encryption. Defaults to 
"SunX509" if not set.
+     */
     public void setSecurityProvider(String securityProvider) {
         this.securityProvider = securityProvider;
     }
@@ -314,6 +400,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return passphrase;
     }
 
+    /**
+     * Password setting to use in order to encrypt/decrypt payloads sent using 
SSH
+     */
     public void setPassphrase(String passphrase) {
         this.passphrase = passphrase;
     }
@@ -338,6 +427,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return serverInitializerFactory;
     }
 
+    /**
+     * To use a custom ServerInitializerFactory
+     */
     public void setServerInitializerFactory(ServerInitializerFactory 
serverInitializerFactory) {
         this.serverInitializerFactory = serverInitializerFactory;
     }
@@ -346,6 +438,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return nettyServerBootstrapFactory;
     }
 
+    /**
+     * To use a custom NettyServerBootstrapFactory
+     */
     public void setNettyServerBootstrapFactory(NettyServerBootstrapFactory 
nettyServerBootstrapFactory) {
         this.nettyServerBootstrapFactory = nettyServerBootstrapFactory;
     }
@@ -354,6 +449,10 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return options;
     }
 
+    /**
+     * 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.
+     */
     public void setOptions(Map<String, Object> options) {
         this.options = options;
     }
@@ -364,7 +463,6 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
 
     /**
      * Set the BossGroup which could be used for handling the new connection 
of the server side across the NettyEndpoint 
-     * @param bossGroup
      */
     public void setBossGroup(EventLoopGroup bossGroup) {
         this.bossGroup = bossGroup;
@@ -375,8 +473,8 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
     }
 
     /**
-     * Set the WorkerGroup which could be used for handling selector eventloop 
across the NettyEndpoint 
-     * @param workerGroup
+     * To use a explicit EventLoopGroup as the boss thread pool.
+     * For example to share a thread pool with multiple consumers. By default 
each consumer has their own boss pool with 1 core thread.
      */
     public void setWorkerGroup(EventLoopGroup workerGroup) {
         this.workerGroup = workerGroup;
@@ -386,6 +484,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return networkInterface;
     }
 
+    /**
+     * When using UDP then this option can be used to specify a network 
interface by its name, such as eth0 to join a multicast group.
+     */
     public void setNetworkInterface(String networkInterface) {
         this.networkInterface = networkInterface;
     }
@@ -394,6 +495,9 @@ public class NettyServerBootstrapConfiguration implements 
Cloneable {
         return enabledProtocols;
     }
 
+    /**
+     * Which protocols to enable when using SSL
+     */
     public void setEnabledProtocols(String enabledProtocols) {
         this.enabledProtocols = enabledProtocols;
     }

Reply via email to