You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2015/03/31 11:44:23 UTC

[1/4] camel git commit: CAMEL-8576 Updated the syslog unit tests with the new added option

Repository: camel
Updated Branches:
  refs/heads/master 5f59322fb -> 780b41b47


CAMEL-8576 Updated the syslog unit tests with the new added option


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

Branch: refs/heads/master
Commit: dfdaed5245fc191ee323a22e6b5f381367ee3a22
Parents: 277aa22
Author: Willem Jiang <wi...@gmail.com>
Authored: Tue Mar 31 17:41:40 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Tue Mar 31 17:42:44 2015 +0800

----------------------------------------------------------------------
 .../camel/component/syslog/NettyDataFormatTest.java  | 15 +++++++++++++++
 .../syslog/NettyRfc5425LongMessageTest.java          |  6 ++++--
 .../camel/component/syslog/NettyRfc5425Test.java     |  6 ++++--
 3 files changed, 23 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/dfdaed52/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyDataFormatTest.java
----------------------------------------------------------------------
diff --git a/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyDataFormatTest.java b/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyDataFormatTest.java
index 81564b7..0f18568 100644
--- a/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyDataFormatTest.java
+++ b/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyDataFormatTest.java
@@ -69,6 +69,20 @@ public class NettyDataFormatTest extends CamelTestSupport {
 
         assertMockEndpointsSatisfied();
     }
+    
+    @Test
+    public void testSendingRawUDPFromNetty() throws IOException, InterruptedException {
+
+        MockEndpoint mock = getMockEndpoint("mock:syslogReceiver");
+        MockEndpoint mock2 = getMockEndpoint("mock:syslogReceiver2");
+        mock.expectedMessageCount(1);
+        mock2.expectedMessageCount(1);
+        mock2.expectedBodiesReceived(message);
+
+        template.sendBody("netty:udp://127.0.0.1:" + serverPort + "?sync=false&allowDefaultCodec=false&useChannelBuffer=true", message);
+
+        assertMockEndpointsSatisfied();
+    }
 
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
@@ -83,6 +97,7 @@ public class NettyDataFormatTest extends CamelTestSupport {
                     .process(new Processor() {
                         public void process(Exchange ex) {
                             assertTrue(ex.getIn().getBody() instanceof SyslogMessage);
+                            SyslogMessage message = ex.getIn().getBody(SyslogMessage.class);
                         }
                     }).to("mock:syslogReceiver").
                     marshal(syslogDataFormat).to("mock:syslogReceiver2");

http://git-wip-us.apache.org/repos/asf/camel/blob/dfdaed52/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425LongMessageTest.java
----------------------------------------------------------------------
diff --git a/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425LongMessageTest.java b/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425LongMessageTest.java
index 54b2c9d..0b7166c 100644
--- a/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425LongMessageTest.java
+++ b/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425LongMessageTest.java
@@ -26,7 +26,7 @@ import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.spi.DataFormat;
 import org.apache.camel.test.AvailablePortFinder;
 import org.apache.camel.test.junit4.CamelTestSupport;
-import org.jboss.netty.buffer.BigEndianHeapChannelBuffer;
+import org.jboss.netty.buffer.ChannelBuffer;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -70,7 +70,7 @@ public class NettyRfc5425LongMessageTest extends CamelTestSupport {
         mock2.expectedMessageCount(1);
         mock2.expectedBodiesReceived(MESSAGE);
 
-        template.sendBody(uri, new BigEndianHeapChannelBuffer(MESSAGE.getBytes("UTF8")));
+        template.sendBody("direct:start", MESSAGE.getBytes("UTF8"));
 
         assertMockEndpointsSatisfied();
     }
@@ -92,6 +92,8 @@ public class NettyRfc5425LongMessageTest extends CamelTestSupport {
                         assertTrue(ex.getIn().getBody() instanceof SyslogMessage);
                     }
                 }).to("mock:syslogReceiver").marshal(syslogDataFormat).to("mock:syslogReceiver2");
+                // Here we need to turn the request body into channelbuffer
+                from("direct:start").convertBodyTo(ChannelBuffer.class).to(uri);
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/dfdaed52/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
----------------------------------------------------------------------
diff --git a/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java b/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
index 81134b8..05eca0f 100644
--- a/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
+++ b/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
@@ -33,6 +33,7 @@ import org.junit.Test;
 public class NettyRfc5425Test extends CamelTestSupport {
 
     private static String uri;
+    private static String uriClient;
     private static int serverPort;
     private final String rfc3164Message = "<165>Aug  4 05:34:00 mymachine myproc[10]: %% It's\n         time to make the do-nuts.  %%  Ingredients: Mix=OK, Jelly=OK #\n"
                                           + "         Devices: Mixer=OK, Jelly_Injector=OK, Frier=OK # Transport:\n" + "         Conveyer1=OK, Conveyer2=OK # %%";
@@ -42,6 +43,7 @@ public class NettyRfc5425Test extends CamelTestSupport {
     public static void initPort() {
         serverPort = AvailablePortFinder.getNextAvailable();
         uri = "netty:tcp://localhost:" + serverPort + "?sync=false&allowDefaultCodec=false&decoders=#decoder&encoder=#encoder";
+        uriClient = uri + "&useChannelBuffer=true";
     }
 
     @Override
@@ -61,8 +63,8 @@ public class NettyRfc5425Test extends CamelTestSupport {
         mock2.expectedMessageCount(2);
         mock2.expectedBodiesReceived(rfc3164Message, rfc5424Message);
 
-        template.sendBody(uri, new BigEndianHeapChannelBuffer(rfc3164Message.getBytes("UTF8")));
-        template.sendBody(uri, new BigEndianHeapChannelBuffer(rfc5424Message.getBytes("UTF8")));
+        template.sendBody(uriClient , rfc3164Message.getBytes("UTF8"));
+        template.sendBody(uriClient, rfc5424Message.getBytes("UTF8"));
 
         assertMockEndpointsSatisfied();
     }


[4/4] camel git commit: CAMEL-8576 Added a option to let camel netty take the message body as byte buffer

Posted by ni...@apache.org.
CAMEL-8576 Added a option to let camel netty take the message body as byte buffer


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

Branch: refs/heads/master
Commit: 780b41b47647141eef375d2e518d6313cdacad88
Parents: dfdaed5
Author: Willem Jiang <wi...@gmail.com>
Authored: Tue Mar 31 17:42:28 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Tue Mar 31 17:42:45 2015 +0800

----------------------------------------------------------------------
 .../camel/component/netty4/NettyConfiguration.java       | 10 ++++++++++
 .../camel/component/netty4/NettyPayloadHelper.java       | 11 ++++++++---
 2 files changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/780b41b4/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 d315f43..7fbe1d8 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
@@ -94,6 +94,8 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration implem
     private boolean udpConnectionlessSending;
     @UriParam(defaultValue = "false")
     private boolean clientMode;
+    @UriParam(defaultValue = "false")
+    private boolean useByteBuf;
     
 
     /**
@@ -493,6 +495,14 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration implem
         this.clientMode = clientMode;
     }
 
+    public boolean isUseByteBuf() {
+        return useByteBuf;
+    }
+
+    public void setUseByteBuf(boolean useByteBuf) {
+        this.useByteBuf = useByteBuf;
+    }
+
     private static <T> void addToHandlersList(List<T> configured, List<T> handlers, Class<T> handlerType) {
         if (handlers != null) {
             for (T handler : handlers) {

http://git-wip-us.apache.org/repos/asf/camel/blob/780b41b4/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyPayloadHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyPayloadHelper.java b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyPayloadHelper.java
index 714957b..3e2a27c 100644
--- a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyPayloadHelper.java
+++ b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyPayloadHelper.java
@@ -18,8 +18,8 @@ package org.apache.camel.component.netty4;
 
 import java.net.InetSocketAddress;
 
+import io.netty.buffer.ByteBuf;
 import io.netty.channel.AddressedEnvelope;
-
 import org.apache.camel.Exchange;
 import org.apache.camel.impl.DefaultExchangeHolder;
 
@@ -43,8 +43,13 @@ public final class NettyPayloadHelper {
             // we should transfer the entire exchange over the wire (includes in/out)
             return DefaultExchangeHolder.marshal(exchange);
         } else {
-            // normal transfer using the body only
-            return exchange.getIn().getBody();
+            if (endpoint.getConfiguration().isUseByteBuf()) {
+                // Just leverage the type converter 
+                return exchange.getIn().getBody(ByteBuf.class);
+            } else {
+                // normal transfer using the body only
+                return exchange.getIn().getBody();
+            }
         }
     }
 


[2/4] camel git commit: CAMEL-8576 Added a option to let camel netty take the message body as byte buffer

Posted by ni...@apache.org.
CAMEL-8576 Added a option to let camel netty take the message body as byte buffer


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

Branch: refs/heads/master
Commit: 277aa22f9a600a423e6316dc2ff97190bce04931
Parents: b046a67
Author: Willem Jiang <wi...@gmail.com>
Authored: Tue Mar 31 17:40:49 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Tue Mar 31 17:42:44 2015 +0800

----------------------------------------------------------------------
 .../camel/component/netty/NettyConfiguration.java       | 12 +++++++++++-
 .../camel/component/netty/NettyPayloadHelper.java       | 10 ++++++++--
 2 files changed, 19 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/277aa22f/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
index 847ca45..8b9d983 100644
--- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
+++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
@@ -94,7 +94,9 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration implem
     private boolean udpConnectionlessSending;
     @UriParam(defaultValue = "false")
     private boolean clientMode;
-    
+    @UriParam(defaultValue = "false")
+    private boolean useChannelBuffer;
+
     /**
      * Returns a copy of this configuration
      */
@@ -466,6 +468,14 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration implem
         this.clientMode = clientMode;
     }
 
+    public boolean isUseChannelBuffer() {
+        return useChannelBuffer;
+    }
+
+    public void setUseChannelBuffer(boolean useChannelBuffer) {
+        this.useChannelBuffer = useChannelBuffer;
+    }
+
     private static <T> void addToHandlersList(List<T> configured, List<T> handlers, Class<T> handlerType) {
         if (handlers != null) {
             for (T handler : handlers) {

http://git-wip-us.apache.org/repos/asf/camel/blob/277aa22f/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyPayloadHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyPayloadHelper.java b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyPayloadHelper.java
index c0839ee..b1dc812 100644
--- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyPayloadHelper.java
+++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyPayloadHelper.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.netty;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.impl.DefaultExchangeHolder;
+import org.jboss.netty.buffer.ChannelBuffer;
 
 /**
  * Helper to get and set the correct payload when transferring data using camel-netty.
@@ -39,8 +40,13 @@ public final class NettyPayloadHelper {
             // we should transfer the entire exchange over the wire (includes in/out)
             return DefaultExchangeHolder.marshal(exchange);
         } else {
-            // normal transfer using the body only
-            return exchange.getIn().getBody();
+            if (endpoint.getConfiguration().isUseChannelBuffer()) {
+                // The NettyConverter could help us for it
+                return exchange.getIn().getBody(ChannelBuffer.class);
+            } else {
+                // normal transfer using the body only
+                return exchange.getIn().getBody();
+            }
         }
     }
 


Re: [3/4] camel git commit: Polished the configuration default setting of camel-netty component

Posted by Willem Jiang <wi...@gmail.com>.
Hi Claus,

Thanks for the reminds, I will update the code shortly.


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On March 31, 2015 at 5:54:21 PM, Claus Ibsen (claus.ibsen@gmail.com) wrote:
> Hi
>  
> There is no need to set default value for booleans which are false as
> default. That is implied. But if its true you need to set it.
>  
> + @UriParam(defaultValue = "false")
> private boolean clientMode;
>  
> Can just be
>  
> + @UriParam
> private boolean clientMode;
>  
> On Tue, Mar 31, 2015 at 11:44 AM, wrote:
> > Polished the configuration default setting of camel-netty component
> >
> >
> > Project: http://git-wip-us.apache.org/repos/asf/camel/repo
> > Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b046a673
> > Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b046a673
> > Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b046a673
> >
> > Branch: refs/heads/master
> > Commit: b046a673e57977a7d5009dc6338fcf41cfa92730
> > Parents: 5f59322
> > Author: Willem Jiang  
> > Authored: Tue Mar 31 17:33:58 2015 +0800
> > Committer: Willem Jiang  
> > Committed: Tue Mar 31 17:42:44 2015 +0800
> >
> > ----------------------------------------------------------------------  
> > .../org/apache/camel/component/netty/NettyConfiguration.java | 6 +++---
> > .../org/apache/camel/component/netty4/NettyConfiguration.java | 7 ++++---  
> > 2 files changed, 7 insertions(+), 6 deletions(-)
> > ----------------------------------------------------------------------  
> >
> >
> > http://git-wip-us.apache.org/repos/asf/camel/blob/b046a673/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java  
> > ----------------------------------------------------------------------  
> > diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java  
> b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java  
> > index ccbbef9..847ca45 100644
> > --- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java  
> > +++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java  
> > @@ -90,11 +90,11 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration  
> implem
> > private long producerPoolMinEvictableIdle = 5 * 60 * 1000L;
> > @UriParam(defaultValue = "true")
> > private boolean producerPoolEnabled = true;
> > - @UriParam
> > + @UriParam(defaultValue = "false")
> > private boolean udpConnectionlessSending;
> > - @UriParam
> > + @UriParam(defaultValue = "false")
> > private boolean clientMode;
> > -
> > +
> > /**
> > * Returns a copy of this configuration
> > */
> >
> > http://git-wip-us.apache.org/repos/asf/camel/blob/b046a673/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 2e2244d..d315f43 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  
> > @@ -72,7 +72,7 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration  
> implem
> > private LoggingLevel serverExceptionCaughtLogLevel = LoggingLevel.WARN;
> > @UriParam(defaultValue = "DEBUG")
> > private LoggingLevel serverClosedChannelExceptionCaughtLogLevel = LoggingLevel.DEBUG;  
> > - @UriParam(defaultValue = "false")
> > + @UriParam(defaultValue = "true")
> > private boolean allowDefaultCodec = true;
> > @UriParam
> > private ClientInitializerFactory clientInitializerFactory;
> > @@ -90,10 +90,11 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration  
> implem
> > private long producerPoolMinEvictableIdle = 5 * 60 * 1000L;
> > @UriParam(defaultValue = "true")
> > private boolean producerPoolEnabled = true;
> > - @UriParam
> > + @UriParam(defaultValue = "false")
> > private boolean udpConnectionlessSending;
> > - @UriParam
> > + @UriParam(defaultValue = "false")
> > private boolean clientMode;
> > +
> >
> > /**
> > * Returns a copy of this configuration
> >
>  
>  
>  
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/
>  


Re: [3/4] camel git commit: Polished the configuration default setting of camel-netty component

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

There is no need to set default value for booleans which are false as
default. That is implied. But if its true you need to set it.

+    @UriParam(defaultValue = "false")
     private boolean clientMode;

Can just be

+    @UriParam
     private boolean clientMode;

On Tue, Mar 31, 2015 at 11:44 AM,  <ni...@apache.org> wrote:
> Polished the configuration default setting of camel-netty component
>
>
> Project: http://git-wip-us.apache.org/repos/asf/camel/repo
> Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b046a673
> Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b046a673
> Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b046a673
>
> Branch: refs/heads/master
> Commit: b046a673e57977a7d5009dc6338fcf41cfa92730
> Parents: 5f59322
> Author: Willem Jiang <wi...@gmail.com>
> Authored: Tue Mar 31 17:33:58 2015 +0800
> Committer: Willem Jiang <wi...@gmail.com>
> Committed: Tue Mar 31 17:42:44 2015 +0800
>
> ----------------------------------------------------------------------
>  .../org/apache/camel/component/netty/NettyConfiguration.java  | 6 +++---
>  .../org/apache/camel/component/netty4/NettyConfiguration.java | 7 ++++---
>  2 files changed, 7 insertions(+), 6 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/camel/blob/b046a673/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
> ----------------------------------------------------------------------
> diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
> index ccbbef9..847ca45 100644
> --- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
> +++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
> @@ -90,11 +90,11 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration implem
>      private long producerPoolMinEvictableIdle = 5 * 60 * 1000L;
>      @UriParam(defaultValue = "true")
>      private boolean producerPoolEnabled = true;
> -    @UriParam
> +    @UriParam(defaultValue = "false")
>      private boolean udpConnectionlessSending;
> -    @UriParam
> +    @UriParam(defaultValue = "false")
>      private boolean clientMode;
> -
> +
>      /**
>       * Returns a copy of this configuration
>       */
>
> http://git-wip-us.apache.org/repos/asf/camel/blob/b046a673/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 2e2244d..d315f43 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
> @@ -72,7 +72,7 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration implem
>      private LoggingLevel serverExceptionCaughtLogLevel = LoggingLevel.WARN;
>      @UriParam(defaultValue = "DEBUG")
>      private LoggingLevel serverClosedChannelExceptionCaughtLogLevel = LoggingLevel.DEBUG;
> -    @UriParam(defaultValue = "false")
> +    @UriParam(defaultValue = "true")
>      private boolean allowDefaultCodec = true;
>      @UriParam
>      private ClientInitializerFactory clientInitializerFactory;
> @@ -90,10 +90,11 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration implem
>      private long producerPoolMinEvictableIdle = 5 * 60 * 1000L;
>      @UriParam(defaultValue = "true")
>      private boolean producerPoolEnabled = true;
> -    @UriParam
> +    @UriParam(defaultValue = "false")
>      private boolean udpConnectionlessSending;
> -    @UriParam
> +    @UriParam(defaultValue = "false")
>      private boolean clientMode;
> +
>
>      /**
>       * Returns a copy of this configuration
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

[3/4] camel git commit: Polished the configuration default setting of camel-netty component

Posted by ni...@apache.org.
Polished the configuration default setting of camel-netty component


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

Branch: refs/heads/master
Commit: b046a673e57977a7d5009dc6338fcf41cfa92730
Parents: 5f59322
Author: Willem Jiang <wi...@gmail.com>
Authored: Tue Mar 31 17:33:58 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Tue Mar 31 17:42:44 2015 +0800

----------------------------------------------------------------------
 .../org/apache/camel/component/netty/NettyConfiguration.java  | 6 +++---
 .../org/apache/camel/component/netty4/NettyConfiguration.java | 7 ++++---
 2 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/b046a673/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
index ccbbef9..847ca45 100644
--- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
+++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
@@ -90,11 +90,11 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration implem
     private long producerPoolMinEvictableIdle = 5 * 60 * 1000L;
     @UriParam(defaultValue = "true")
     private boolean producerPoolEnabled = true;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean udpConnectionlessSending;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean clientMode;
-
+    
     /**
      * Returns a copy of this configuration
      */

http://git-wip-us.apache.org/repos/asf/camel/blob/b046a673/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 2e2244d..d315f43 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
@@ -72,7 +72,7 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration implem
     private LoggingLevel serverExceptionCaughtLogLevel = LoggingLevel.WARN;
     @UriParam(defaultValue = "DEBUG")
     private LoggingLevel serverClosedChannelExceptionCaughtLogLevel = LoggingLevel.DEBUG;
-    @UriParam(defaultValue = "false")
+    @UriParam(defaultValue = "true")
     private boolean allowDefaultCodec = true;
     @UriParam
     private ClientInitializerFactory clientInitializerFactory;
@@ -90,10 +90,11 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration implem
     private long producerPoolMinEvictableIdle = 5 * 60 * 1000L;
     @UriParam(defaultValue = "true")
     private boolean producerPoolEnabled = true;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean udpConnectionlessSending;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean clientMode;
+    
 
     /**
      * Returns a copy of this configuration