You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2015/01/23 20:03:01 UTC

svn commit: r1654321 - in /tomcat/trunk/java/org/apache/tomcat/util/net: Nio2Endpoint.java SendfileState.java

Author: markt
Date: Fri Jan 23 19:03:00 2015
New Revision: 1654321

URL: http://svn.apache.org/r1654321
Log:
Extract SendfileState to a separate class

Added:
    tomcat/trunk/java/org/apache/tomcat/util/net/SendfileState.java   (with props)
Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1654321&r1=1654320&r2=1654321&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Fri Jan 23 19:03:00 2015
@@ -1353,10 +1353,6 @@ public class Nio2Endpoint extends Abstra
         ((Nio2SocketWrapper) socket).awaitBytes();
     }
 
-    public enum SendfileState {
-        PENDING, DONE, ERROR
-    }
-
     private CompletionHandler<Integer, SendfileData> sendfile = new CompletionHandler<Integer, SendfileData>() {
 
         @Override

Added: tomcat/trunk/java/org/apache/tomcat/util/net/SendfileState.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SendfileState.java?rev=1654321&view=auto
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/SendfileState.java (added)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/SendfileState.java Fri Jan 23 19:03:00 2015
@@ -0,0 +1,37 @@
+/*
+ *  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.tomcat.util.net;
+
+public enum SendfileState {
+
+    /**
+     * The sending of the file has started but has not completed. Sendfile is
+     * still using the socket.
+     */
+    PENDING,
+
+    /**
+     * The file has been fully sent. Sendfile is no longer using the socket.
+     */
+    DONE,
+
+    /**
+     * Something went wrong. The file may or may not have been sent. The socket
+     * is in an unknown state.
+     */
+    ERROR
+}

Propchange: tomcat/trunk/java/org/apache/tomcat/util/net/SendfileState.java
------------------------------------------------------------------------------
    svn:eol-style = native



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