tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject svn commit: r650962 - in /tomcat/sandbox/tomcat-lite: .project coyote-extensions/org/apache/coyote/adapters/CoyoteServer.java coyote-extensions/org/apache/coyote/adapters/EchoAdapter.java java/org/apache/tomcat/lite/TomcatLite.java
Date Wed, 23 Apr 2008 17:51:53 GMT
Author: costin
Date: Wed Apr 23 10:51:52 2008
New Revision: 650962

URL: http://svn.apache.org/viewvc?rev=650962&view=rev
Log:
Remove deps on classes that are not committed yet

Modified:
    tomcat/sandbox/tomcat-lite/.project
    tomcat/sandbox/tomcat-lite/coyote-extensions/org/apache/coyote/adapters/CoyoteServer.java
    tomcat/sandbox/tomcat-lite/coyote-extensions/org/apache/coyote/adapters/EchoAdapter.java
    tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/TomcatLite.java

Modified: tomcat/sandbox/tomcat-lite/.project
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/.project?rev=650962&r1=650961&r2=650962&view=diff
==============================================================================
--- tomcat/sandbox/tomcat-lite/.project (original)
+++ tomcat/sandbox/tomcat-lite/.project Wed Apr 23 10:51:52 2008
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>tomcat-lite</name>
+	<name>tomcat-lite-clean</name>
 	<comment></comment>
 	<projects>
 	</projects>

Modified: tomcat/sandbox/tomcat-lite/coyote-extensions/org/apache/coyote/adapters/CoyoteServer.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/coyote-extensions/org/apache/coyote/adapters/CoyoteServer.java?rev=650962&r1=650961&r2=650962&view=diff
==============================================================================
--- tomcat/sandbox/tomcat-lite/coyote-extensions/org/apache/coyote/adapters/CoyoteServer.java
(original)
+++ tomcat/sandbox/tomcat-lite/coyote-extensions/org/apache/coyote/adapters/CoyoteServer.java
Wed Apr 23 10:51:52 2008
@@ -5,7 +5,6 @@
 import org.apache.coyote.Adapter;
 import org.apache.coyote.ProtocolHandler;
 import org.apache.coyote.http11.Http11NioProtocol;
-import org.apache.coyote.http11.simple.SimpleProtocolHandler;
 import org.apache.juli.JdkLoggerConfig;
 import org.apache.tomcat.util.buf.BufferInfo;
 import org.apache.tomcat.util.modeler.Registry;
@@ -126,29 +125,6 @@
     this.port = port;
   }
   
-  /** 
-   */
-  public static ProtocolHandler getDefaultConnector(int port, boolean daemon) {
-//    try {
-//      Library.initialize("tcnative-1");
-//      Http11AprProtocol proto = new Http11AprProtocol();
-//      proto.setCompression("on");
-//      proto.setCompressionMinSize(32);
-//      proto.setPort(port);
-//      proto.getEndpoint().setDaemon(daemon);
-//      return proto;
-//    } catch (Exception e) {
-//      e.printStackTrace();
-//      //throw new RuntimeException(e);
-//    }    
-    
-    SimpleProtocolHandler proto = new SimpleProtocolHandler();
-    proto.setPort(port);
-    proto.setDaemon(daemon);
-    
-    return proto;
-  }
-  
   public void setNioConnector() {
     Http11NioProtocol proto = new Http11NioProtocol();
     proto.setCompression("on");
@@ -168,7 +144,8 @@
         return;
       }
       if (proto == null) {
-          proto = getDefaultConnector(port, daemon);
+          // Default for now. 
+          setNioConnector();
       }
       initAdapters();
       registry.registerComponent(adapter, ":name=adapter" + (port), null);

Modified: tomcat/sandbox/tomcat-lite/coyote-extensions/org/apache/coyote/adapters/EchoAdapter.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/coyote-extensions/org/apache/coyote/adapters/EchoAdapter.java?rev=650962&r1=650961&r2=650962&view=diff
==============================================================================
--- tomcat/sandbox/tomcat-lite/coyote-extensions/org/apache/coyote/adapters/EchoAdapter.java
(original)
+++ tomcat/sandbox/tomcat-lite/coyote-extensions/org/apache/coyote/adapters/EchoAdapter.java
Wed Apr 23 10:51:52 2008
@@ -5,7 +5,7 @@
 import org.apache.coyote.Adapter;
 import org.apache.coyote.Request;
 import org.apache.coyote.Response;
-import org.apache.coyote.client.AsyncHttp;
+//import org.apache.coyote.client.AsyncHttp;
 import org.apache.tomcat.util.buf.ByteChunk;
 import org.apache.tomcat.util.net.SocketStatus;
 
@@ -24,7 +24,7 @@
     public void service(Request req, final Response res) throws Exception {
       ByteChunk reqBuf = new ByteChunk(1024);
       reqBuf.append("REQ HEAD:\n");
-      AsyncHttp.serializeRequest(req, reqBuf);
+      //AsyncHttp.serializeRequest(req, reqBuf);
       reqBuf.append("CONTENT_LENGTH:")
         .append(Integer.toString(req.getContentLength()))
         .append("\n");

Modified: tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/TomcatLite.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/TomcatLite.java?rev=650962&r1=650961&r2=650962&view=diff
==============================================================================
--- tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/TomcatLite.java (original)
+++ tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/TomcatLite.java Wed Apr 23 10:51:52
2008
@@ -22,11 +22,11 @@
 import org.apache.coyote.ActionCode;
 import org.apache.coyote.ActionHook;
 import org.apache.coyote.Adapter;
+import org.apache.coyote.OutputBuffer;
 import org.apache.coyote.Request;
 import org.apache.coyote.Response;
 import org.apache.coyote.adapters.CoyoteServer;
 import org.apache.coyote.adapters.MapperAdapter;
-import org.apache.coyote.client.BlockingCoyoteBuffers;
 import org.apache.tomcat.servlets.addon.AddonSupport;
 import org.apache.tomcat.servlets.addon.UserTemplateClassMapper;
 import org.apache.tomcat.util.buf.ByteChunk;
@@ -492,8 +492,25 @@
       req.setRequestURI(uri);
       ServletResponseImpl res = req.getResponse();
       res.getCoyoteResponse().setOutputBuffer(
-                  new BlockingCoyoteBuffers.ByteChunkOutputBuffer(out));
+                  new ByteChunkOutputBuffer(out));
       return req;
+    }
+    
+    // Temp.
+    public static class ByteChunkOutputBuffer implements OutputBuffer {
+        
+        protected ByteChunk output = null;
+    
+        public ByteChunkOutputBuffer(ByteChunk output) {
+          this.output = output;
+        }
+    
+        public int doWrite(ByteChunk chunk, Response response) 
+            throws IOException {
+          output.append(chunk);
+          return chunk.getLength();
+        }
+    
     }
     
     public ServletRequestImpl createMessage() {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message