camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aka...@apache.org
Subject svn commit: r927698 [2/2] - in /camel/trunk: components/ components/camel-netty/ components/camel-netty/src/ components/camel-netty/src/main/ components/camel-netty/src/main/java/ components/camel-netty/src/main/java/org/ components/camel-netty/src/mai...
Date Fri, 26 Mar 2010 05:46:08 GMT
Added: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyTCPAsyncTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyTCPAsyncTest.java?rev=927698&view=auto
==============================================================================
--- camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyTCPAsyncTest.java
(added)
+++ camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyTCPAsyncTest.java
Fri Mar 26 05:46:07 2010
@@ -0,0 +1,90 @@
+/**
+ * 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.
+ */
+package org.apache.camel.component.netty;
+
+import java.io.BufferedInputStream;
+import java.io.FileInputStream;
+import java.io.InputStream;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+import org.apache.camel.Processor;
+import org.apache.camel.Produce;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.converter.IOConverter;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.junit.Test;
+
+public class NettyTCPAsyncTest extends CamelTestSupport {
+    private static final transient Log LOG = LogFactory.getLog(NettyTCPAsyncTest.class);
+    
+    @EndpointInject(uri = "mock:result")
+    protected MockEndpoint resultEndpoint;
+    @Produce(uri = "direct:start")
+    protected ProducerTemplate producerTemplate;
+    
+    private void sendFile(String uri) throws Exception {
+        producerTemplate.send(uri, new Processor() {
+            public void process(Exchange exchange) throws Exception {
+             // Read from an input stream
+                InputStream is = new BufferedInputStream(
+                    new FileInputStream("./src/test/resources/test.txt"));
+
+                byte buffer[] = IOConverter.toBytes(is);
+                is.close();
+                
+                // Set the property of the charset encoding
+                exchange.setProperty(Exchange.CHARSET_NAME, "UTF-8");
+                Message in = exchange.getIn();
+                in.setBody(buffer);
+            }            
+        });
+    }
+
+    @Test
+    public void testTCPInOnlyWithNettyConsumer() throws Exception {
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Beginning Test ---> testTCPInOnlyWithNettyConsumer()");
+        }
+        
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedMessageCount(1);
+        sendFile("netty:tcp://localhost:5150");
+        
+        mock.assertIsSatisfied();
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Completed Test ---> testTCPInOnlyWithNettyConsumer()");
+        }            
+    }
+    
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("netty:tcp://localhost:5150")
+                    .to("mock:result");                
+            }
+        };
+    }
+
+}

Propchange: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyTCPAsyncTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyTCPSyncTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyTCPSyncTest.java?rev=927698&view=auto
==============================================================================
--- camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyTCPSyncTest.java
(added)
+++ camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyTCPSyncTest.java
Fri Mar 26 05:46:07 2010
@@ -0,0 +1,87 @@
+/**
+ * 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.
+ */
+package org.apache.camel.component.netty;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.Produce;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.junit.Test;
+
+public class NettyTCPSyncTest extends CamelTestSupport {
+    private static final transient Log LOG = LogFactory.getLog(NettyTCPSyncTest.class);
+
+    @Produce(uri = "direct:start")
+    protected ProducerTemplate producerTemplate;
+
+    @Test
+    public void testTCPStringInOutWithNettyConsumer() throws Exception {
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Beginning Test ---> testTCPInOutWithNettyConsumer()");
+        }
+        
+        String response = producerTemplate.requestBody(
+            "netty:tcp://localhost:5150?sync=true", 
+            "Epitaph in Kohima, India marking the WWII Battle of Kohima and Imphal, Burma
Campaign - Attributed to John Maxwell Edmonds", String.class);        
+        assertEquals("When You Go Home, Tell Them Of Us And Say, For Your Tomorrow, We Gave
Our Today.", response);
+  
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Completed Test ---> testTCPInOutWithNettyConsumer()");
+        }
+    }
+
+    @Test
+    public void testTCPObjectInOutWithNettyConsumer() throws Exception {
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Beginning Test ---> testUDPInOutWithNettyConsumer()");
+        }
+        
+        Poetry poetry = new Poetry();
+        Poetry response = (Poetry) producerTemplate.requestBody("netty:tcp://localhost:5150?sync=true",
poetry);        
+        assertEquals("Dr. Sarojini Naidu", response.getPoet());
+        
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Completed Test ---> testUDPInOutWithNettyConsumer()");
+        }
+    }  
+    
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("netty:tcp://localhost:5150?sync=true")
+                    .process(new Processor() {
+                        public void process(Exchange exchange) throws Exception {
+                            if (exchange.getIn().getBody() instanceof Poetry) {
+                                Poetry poetry = (Poetry) exchange.getIn().getBody();
+                                poetry.setPoet("Dr. Sarojini Naidu");
+                                exchange.getOut().setBody(poetry);
+                                return;
+                            }
+                            exchange.getOut().setBody("When You Go Home, Tell Them Of Us
And Say, For Your Tomorrow, We Gave Our Today.");                           
+                        }
+                    });                
+            }
+        };
+    }
+
+}

Propchange: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyTCPSyncTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPAsyncTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPAsyncTest.java?rev=927698&view=auto
==============================================================================
--- camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPAsyncTest.java
(added)
+++ camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPAsyncTest.java
Fri Mar 26 05:46:07 2010
@@ -0,0 +1,92 @@
+/**
+ * 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.
+ */
+package org.apache.camel.component.netty;
+
+import java.io.BufferedInputStream;
+import java.io.FileInputStream;
+import java.io.InputStream;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+import org.apache.camel.Processor;
+import org.apache.camel.Produce;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.converter.IOConverter;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.junit.Test;
+
+public class NettyUDPAsyncTest extends CamelTestSupport {
+    private static final transient Log LOG = LogFactory.getLog(NettyUDPAsyncTest.class);
+    
+    @EndpointInject(uri = "mock:result")
+    protected MockEndpoint resultEndpoint;
+    @Produce(uri = "direct:start")
+    protected ProducerTemplate producerTemplate;
+    
+    private void sendFile(String uri) throws Exception {
+        producerTemplate.send(uri, new Processor() {
+            public void process(Exchange exchange) throws Exception {
+             // Read from an input stream
+                InputStream is = new BufferedInputStream(
+                    new FileInputStream("./src/test/resources/test.txt"));
+
+                byte buffer[] = IOConverter.toBytes(is);
+                is.close();
+                
+                // Set the property of the charset encoding
+                exchange.setProperty(Exchange.CHARSET_NAME, "UTF-8");
+                Message in = exchange.getIn();
+                in.setBody(buffer);
+            }            
+        });
+    }
+
+    @Test
+    public void testUDPInOnlyWithNettyConsumer() throws Exception {
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Beginning Test ---> testUDPInOnlyWithNettyConsumer()");
+        }
+        
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedMessageCount(1);
+        sendFile("netty:udp://localhost:5151");        
+        mock.assertIsSatisfied();
+
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Completed Test ---> testUDPInOnlyWithNettyConsumer()");
+        }    
+    }
+
+    
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("netty:udp://localhost:5151")
+                    .to("mock:result")
+                    .to("log:Message"); 
+            }
+        };
+    }
+
+}

Propchange: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPAsyncTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPObjectSyncTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPObjectSyncTest.java?rev=927698&view=auto
==============================================================================
--- camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPObjectSyncTest.java
(added)
+++ camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPObjectSyncTest.java
Fri Mar 26 05:46:07 2010
@@ -0,0 +1,67 @@
+/**
+ * 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.
+ */
+package org.apache.camel.component.netty;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.Produce;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.junit.Test;
+
+public class NettyUDPObjectSyncTest extends CamelTestSupport {
+    private static final transient Log LOG = LogFactory.getLog(NettyUDPObjectSyncTest.class);
+
+    @Produce(uri = "direct:start")
+    protected ProducerTemplate producerTemplate;
+    
+    @Test
+    public void testUDPObjectInOutWithNettyConsumer() throws Exception {
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Beginning Test ---> testUDPInOutWithNettyConsumer()");
+        }
+        
+        Poetry poetry = new Poetry();
+        Poetry response = producerTemplate.requestBody("netty:udp://localhost:5155?sync=true",
poetry, Poetry.class);        
+        assertEquals("Dr. Sarojini Naidu", response.getPoet());
+        
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Completed Test ---> testUDPInOutWithNettyConsumer()");
+        }
+    }    
+    
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {                
+                from("netty:udp://localhost:5155?sync=true")
+                    .process(new Processor() {
+                        public void process(Exchange exchange) throws Exception {
+                            Poetry poetry = (Poetry) exchange.getIn().getBody();
+                            poetry.setPoet("Dr. Sarojini Naidu");
+                            exchange.getOut().setBody(poetry);
+                        }
+                    });
+            }
+        };
+    }
+    
+}  

Propchange: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPObjectSyncTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPSyncTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPSyncTest.java?rev=927698&view=auto
==============================================================================
--- camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPSyncTest.java
(added)
+++ camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPSyncTest.java
Fri Mar 26 05:46:07 2010
@@ -0,0 +1,70 @@
+/**
+ * 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.
+ */
+package org.apache.camel.component.netty;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.Produce;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.junit.Test;
+
+public class NettyUDPSyncTest extends CamelTestSupport {
+    private static final transient Log LOG = LogFactory.getLog(NettyUDPSyncTest.class);
+
+    @Produce(uri = "direct:start")
+    protected ProducerTemplate producerTemplate;
+
+    @Test
+    public void testUDPStringInOutWithNettyConsumer() throws Exception {
+        
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Beginning Test ---> testUDPInOutWithNettyConsumer()");
+        }
+        
+        for (int i = 0; i < 5; i++) {
+            String response = producerTemplate.requestBody(
+                "netty:udp://localhost:5152?sync=true", 
+                "After the Battle of Thermopylae in 480 BC - Simonides of Ceos (c. 556 BC-468
BC), Greek lyric poet wrote ?", String.class);        
+            assertEquals("Go tell the Spartans, thou that passest by, That faithful to their
precepts here we lie.", response);
+        }
+        
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Completed Test ---> testUDPInOutWithNettyConsumer()");
+        }        
+    }   
+    
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {                
+                from("netty:udp://localhost:5152?sync=true")
+                    .process(new Processor() {
+                        public void process(Exchange exchange) throws Exception {
+                            exchange.getOut().setBody("Go tell the Spartans, thou that passest
by, That faithful to their precepts here we lie.");                           
+                        }
+                    });
+            }
+        };
+    }
+    
+
+} 

Propchange: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPSyncTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/Poetry.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/Poetry.java?rev=927698&view=auto
==============================================================================
--- camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/Poetry.java
(added)
+++ camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/Poetry.java
Fri Mar 26 05:46:07 2010
@@ -0,0 +1,57 @@
+/**
+ * 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.
+ */
+
+package org.apache.camel.component.netty;
+
+import java.io.Serializable;
+
+public class Poetry implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private String poet = "?";
+    private String poem = "ONCE in the dream of a night I stood\n" 
+                          + "Lone in the light of a magical wood,\n"  
+                          + "Soul-deep in visions that poppy-like sprang;\n"  
+                          + "And spirits of Truth were the birds that sang,\n"  
+                          + "And spirits of Love were the stars that glowed,\n" 
+                          + "And spirits of Peace were the streams that flowed\n"  
+                          + "In that magical wood in the land of sleep." 
+                          + "\n" 
+                          + "Lone in the light of that magical grove,\n"  
+                          + "I felt the stars of the spirits of Love\n" 
+                          + "Gather and gleam round my delicate youth,\n" 
+                          + "And I heard the song of the spirits of Truth;\n" 
+                          + "To quench my longing I bent me low\n"  
+                          + "By the streams of the spirits of Peace that flow\n" 
+                          + "In that magical wood in the land of sleep.";
+
+    public String getPoet() {
+        return poet;
+    }
+    
+    public void setPoet(String poet) {
+        this.poet = poet;
+    }
+    
+    public String getPoem() {
+        return poem;
+    }
+    
+    public void setPoem(String poem) {
+        this.poem = poem;
+    } 
+    
+}

Propchange: camel/trunk/components/camel-netty/src/test/java/org/apache/camel/component/netty/Poetry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-netty/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/resources/log4j.properties?rev=927698&view=auto
==============================================================================
--- camel/trunk/components/camel-netty/src/test/resources/log4j.properties (added)
+++ camel/trunk/components/camel-netty/src/test/resources/log4j.properties Fri Mar 26 05:46:07
2010
@@ -0,0 +1,38 @@
+## ------------------------------------------------------------------------
+## 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.
+## ------------------------------------------------------------------------
+
+#
+# The logging properties used for eclipse testing, We want to see debug output on the console.
+#
+log4j.rootLogger=DEBUG, file
+
+# uncomment the following to enable camel debugging
+log4j.logger.org.apache.camel.component.netty=DEBUG
+log4j.logger.org.apache.camel=DEBUG
+log4j.logger.org.apache.commons.net=TRACE
+
+# CONSOLE appender not used by default
+log4j.appender.out=org.apache.log4j.ConsoleAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+#log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n
+log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+
+# File appender
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.file.file=target/camel-netty-test.log
\ No newline at end of file

Propchange: camel/trunk/components/camel-netty/src/test/resources/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-netty/src/test/resources/test.txt
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/test/resources/test.txt?rev=927698&view=auto
==============================================================================
--- camel/trunk/components/camel-netty/src/test/resources/test.txt (added)
+++ camel/trunk/components/camel-netty/src/test/resources/test.txt Fri Mar 26 05:46:07 2010
@@ -0,0 +1,19 @@
+Song Of A Dream
+by: Dr Sarojini Naidu
+
+ONCE in the dream of a night I stood 
+Lone in the light of a magical wood, 
+Soul-deep in visions that poppy-like sprang; 
+And spirits of Truth were the birds that sang, 
+And spirits of Love were the stars that glowed, 
+And spirits of Peace were the streams that flowed 
+In that magical wood in the land of sleep.
+
+
+Lone in the light of that magical grove, 
+I felt the stars of the spirits of Love 
+Gather and gleam round my delicate youth, 
+And I heard the song of the spirits of Truth; 
+To quench my longing I bent me low 
+By the streams of the spirits of Peace that flow 
+In that magical wood in the land of sleep.
\ No newline at end of file

Propchange: camel/trunk/components/camel-netty/src/test/resources/test.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: camel/trunk/components/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/pom.xml?rev=927698&r1=927697&r2=927698&view=diff
==============================================================================
--- camel/trunk/components/pom.xml (original)
+++ camel/trunk/components/pom.xml Fri Mar 26 05:46:07 2010
@@ -74,6 +74,7 @@
     <module>camel-mina</module>
     <module>camel-msv</module>
     <module>camel-mvel</module>
+    <module>camel-netty</module>
     <module>camel-nagios</module>
     <module>camel-ognl</module>
     <module>camel-osgi</module>

Modified: camel/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=927698&r1=927697&r2=927698&view=diff
==============================================================================
--- camel/trunk/parent/pom.xml (original)
+++ camel/trunk/parent/pom.xml Fri Mar 26 05:46:07 2010
@@ -91,6 +91,7 @@
     <lucene-version>3.0.1</lucene-version>
     <mina-version>1.1.7</mina-version>
     <mockito-version>1.8.2</mockito-version>
+    <netty-version>3.1.5.GA</netty-version>
     <ognl-version>2.7.3_3</ognl-version>
     <openjpa-version>1.2.2</openjpa-version>
     <pax-exam-version>1.2.0</pax-exam-version>



Mime
View raw message