master moved from c4ddf0244319 to b4bdf4daa231

2 new revisions:

Revision: a19070c41163
Author:   Jean Deruelle <[email protected]>
Date:     Thu Jan 30 10:37:00 2014 UTC
Log:      Update Issue 5...
http://code.google.com/p/commscale/source/detail?r=a19070c41163&repo=load-balancer

Revision: b4bdf4daa231
Author:   Jean Deruelle <[email protected]>
Date:     Thu Jan 30 10:39:09 2014 UTC
Log:      Update Issue 5...
http://code.google.com/p/commscale/source/detail?r=b4bdf4daa231&repo=load-balancer

==============================================================================
Revision: a19070c41163
Author:   Jean Deruelle <[email protected]>
Date:     Thu Jan 30 10:37:00 2014 UTC
Log:      Update Issue 5

comment adding support for the Server side as well

(cherry picked from commit 816c074b53e21b774c13b5fac9647225ae7b404c)

http://code.google.com/p/commscale/source/detail?r=a19070c41163&repo=load-balancer

Modified:
/jar/src/main/java/org/mobicents/tools/http/balancer/HttpBalancerForwarder.java /jar/src/main/java/org/mobicents/tools/http/balancer/HttpServerPipelineFactory.java

=======================================
--- /jar/src/main/java/org/mobicents/tools/http/balancer/HttpBalancerForwarder.java Thu Jan 30 10:16:53 2014 UTC +++ /jar/src/main/java/org/mobicents/tools/http/balancer/HttpBalancerForwarder.java Thu Jan 30 10:37:00 2014 UTC
@@ -70,7 +70,7 @@
                }
                logger.info("HTTP LB listening on port " + httpPort);
logger.debug("HTTP maxContentLength Chunking set to " + maxContentLength); - HttpChannelAssociations.serverBootstrap.setPipelineFactory(new HttpServerPipelineFactory(balancerRunner)); + HttpChannelAssociations.serverBootstrap.setPipelineFactory(new HttpServerPipelineFactory(balancerRunner, maxContentLength)); serverChannel = HttpChannelAssociations.serverBootstrap.bind(new InetSocketAddress(httpPort)); HttpChannelAssociations.inboundBootstrap.setPipelineFactory(new HttpClientPipelineFactory(maxContentLength));
        }
=======================================
--- /jar/src/main/java/org/mobicents/tools/http/balancer/HttpServerPipelineFactory.java Fri Feb 15 22:00:00 2013 UTC +++ /jar/src/main/java/org/mobicents/tools/http/balancer/HttpServerPipelineFactory.java Thu Jan 30 10:37:00 2014 UTC
@@ -1,23 +1,20 @@
 /*
- * JBoss, Home of Professional Open Source
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+ * TeleStax, Open Source Cloud Communications
+ * Copyright 2011-2013, Telestax Inc and individual contributors
+ * by the @authors tag.
  *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
+ * This program is free software: you can redistribute it and/or modify
+ * under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation; either version 3 of
  * the License, or (at your option) any later version.
  *
- * This software is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
  *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>
  */

 package org.mobicents.tools.http.balancer;
@@ -36,14 +33,24 @@
  * @author Andy Taylor ([email protected])
  * @author Trustin Lee ([email protected])
  * @author Vladimir Ralev ([email protected])
+ * @author Jean Deruelle ([email protected])
  *
* @version $Rev: 1868 $, $Date: 2009-11-03 01:48:39 -0500 (Tue, 03 Nov 2009) $
  */
 public class HttpServerPipelineFactory implements ChannelPipelineFactory {
        BalancerRunner balancerRunner;
-       public HttpServerPipelineFactory(BalancerRunner balancerRunner) {
+
+    int maxContentLength = 1048576;
+
+ public HttpServerPipelineFactory(BalancerRunner balancerRunner, int maxContentLength) {
                this.balancerRunner = balancerRunner;
+               this.maxContentLength = maxContentLength;
        }
+
+    public HttpClientPipelineFactory(int maxContentLength) {
+       this.maxContentLength = maxContentLength;
+    }
+
     public ChannelPipeline getPipeline() throws Exception {
         // Create a default pipeline implementation.
         ChannelPipeline pipeline = pipeline();
@@ -55,7 +62,8 @@

         pipeline.addLast("decoder", new HttpRequestDecoder());
// http://code.google.com/p/commscale/issues/detail?id=5 support for HttpChunks
-        pipeline.addLast("aggregator", new HttpChunkAggregator(1048576));
+ // https://telestax.atlassian.net/browse/LB-8 if commented accessing the RestComm Management console fails, so making the maxContentLength Configurable + pipeline.addLast("aggregator", new HttpChunkAggregator(maxContentLength));
         pipeline.addLast("encoder", new HttpResponseEncoder());
// Remove the following line if you don't want automatic content compression.
         //pipeline.addLast("deflater", new HttpContentCompressor());

==============================================================================
Revision: b4bdf4daa231
Author:   Jean Deruelle <[email protected]>
Date:     Thu Jan 30 10:39:09 2014 UTC
Log:      Update Issue 5

 compile fix

(cherry picked from commit 3a2b234501e12fcaa6003de2bb3497af81213b70)

http://code.google.com/p/commscale/source/detail?r=b4bdf4daa231&repo=load-balancer

Modified:
/jar/src/main/java/org/mobicents/tools/http/balancer/HttpServerPipelineFactory.java

=======================================
--- /jar/src/main/java/org/mobicents/tools/http/balancer/HttpServerPipelineFactory.java Thu Jan 30 10:37:00 2014 UTC +++ /jar/src/main/java/org/mobicents/tools/http/balancer/HttpServerPipelineFactory.java Thu Jan 30 10:39:09 2014 UTC
@@ -46,10 +46,6 @@
                this.balancerRunner = balancerRunner;
                this.maxContentLength = maxContentLength;
        }
-
-    public HttpClientPipelineFactory(int maxContentLength) {
-       this.maxContentLength = maxContentLength;
-    }

     public ChannelPipeline getPipeline() throws Exception {
         // Create a default pipeline implementation.
@@ -70,4 +66,8 @@
pipeline.addLast("handler", new HttpRequestHandler(balancerRunner));
         return pipeline;
     }
+
+    public void setMaxContentLength(int maxContentLength) {
+       this.maxContentLength = maxContentLength;
+    }
 }

--

--- You received this message because you are subscribed to the Google Groups "mobicents-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to