Java Mailing List Archive

http://www.junlu.com/

Home » dev.tomcat »

svn commit: r992194 -
/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Mladen Turk

2010-09-03


Author LoginPost Reply
Author: mturk
Date: Fri Sep 3 04:09:25 2010
New Revision: 992194

URL: http://svn.apache.org/viewvc?rev=992194&view=rev
Log:
Trim trailing spaces. No functional change

Modified:
  tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=992194&r1=992193&r2=992194&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Fri Sep 3 04:09:25 2010
@@(protected)
   */
  protected long sslContext = 0;

-  
+
  // ------------------------------------------------------------- Properties


@@(protected)
  protected boolean deferAccept = true;
  public void setDeferAccept(boolean deferAccept) { this.deferAccept = deferAccept; }
  public boolean getDeferAccept() { return deferAccept; }
-  
+

  /**
   * Size of the socket poller.
@@(protected)
     if (sendfiles == null) {
        return 0;
     }
-    
+
     int sendfileCount = 0;
     for (int i = 0; i < sendfiles.length; i++) {
        sendfileCount += sendfiles[i].getSendfileCount();
@@(protected)
          sendfileThreadCount = 1;
        }
     }
-    
+
     // Delay accepting of new connections until data is available
     // Only Linux kernels 2.4 + have that implemented
     // on other platforms this call is noop and will return APR_ENOTIMPL.
@@(protected)

     // Initialize SSL if needed
     if (isSSLEnabled()) {
-        
+
        // SSL protocol
        int value = SSL.SSL_PROTOCOL_ALL;
        if ("SSLv2".equalsIgnoreCase(SSLProtocol)) {
@@(protected)
          }
        }
     }
-   }  
+   }

  /**
   * Pause the endpoint, which will make it stop accepting new sockets.
@@(protected)
     if (running) {
        stop();
     }
-    
+
     // Destroy pool if it was initialised
     if (serverSockPool != 0) {
        Pool.destroy(serverSockPool);
        serverSockPool = 0;
     }
-    
+
     // Close server socket if it was initialised
     if (serverSock != 0) {
        Socket.close(serverSock);
        serverSock = 0;
     }
-    
+
     sslContext = 0;
-    
+
     // Close all APR memory pools and resources if initialised
     if (rootPool != 0) {
        Pool.destroy(rootPool);
        rootPool = 0;
     }
-    
+
     initialized = false;
  }

@@(protected)
  }


-  
+
  /**
   * Allocate a new poller of the specified size.
   */
@@(protected)
     }
  }

-  
+
  /**
   * Process given socket.
   */
@@(protected)
     }
     return true;
  }
-  
+

  /**
   * Process given socket.
@@(protected)
     }
     return true;
  }
-  
+

  /**
   * Process given socket for an event.
@@(protected)
             } else {
                Thread.currentThread().setContextClassLoader(
                     getClass().getClassLoader());
-             }          
+             }
             getExecutor().execute(proc);
          } finally {
             if (IS_SECURITY_ENABLED) {
@@(protected)
     }
     return true;
  }
-  
+

  // --------------------------------------------------- Acceptor Inner Class

@@(protected)

     protected long[] addS;
     protected volatile int addCount = 0;
-    
+
     protected boolean comet = true;

     protected volatile int keepAliveCount = 0;
@@(protected)
     public Poller(boolean comet) {
        this.comet = comet;
     }
-    
+
     /**
      * Create the poller. With some versions of APR, the maximum poller size will
      * be 62 (recompiling APR is necessary to remove this limitation).
@@(protected)
                  // Check for failed sockets and hand this socket off to a worker
                  if (((desc[n*2] & Poll.APR_POLLHUP) == Poll.APR_POLLHUP)
                        || ((desc[n*2] & Poll.APR_POLLERR) == Poll.APR_POLLERR)
-                        || (comet && (!processSocket(desc[n*2+1], SocketStatus.OPEN)))
+                        || (comet && (!processSocket(desc[n*2+1], SocketStatus.OPEN)))
                        || (!comet && (!processSocket(desc[n*2+1])))) {
                     // Close socket and clear pool
                     if (comet) {
@@(protected)
        }

     }
-    
+
  }


@@(protected)
     protected long pool = 0;
     protected long[] desc;
     protected HashMap<Long, SendfileData> sendfileData;
-    
+
     protected volatile int sendfileCount;
     public int getSendfileCount() { return sendfileCount; }

@@(protected)
   * and do the handshake.
   */
  protected class SocketWithOptionsProcessor implements Runnable {
-    
+
     protected long socket = 0;
-    
+
     public SocketWithOptionsProcessor(long socket) {
        this.socket = socket;
     }
@@(protected)
          }
        } else {
          // Process the request from this socket
-           if (!setSocketOptions(socket)
+           if (!setSocketOptions(socket)
                || handler.process(socket) == Handler.SocketState.CLOSED) {
             // Close socket and pool
             Socket.destroy(socket);
@@(protected)
        }

     }
-    
+
  }
-  
-  
+
+
  // ---------------------------------------------- SocketProcessor Inner Class


@@(protected)
   * external Executor thread pool.
   */
  protected class SocketProcessor implements Runnable {
-    
+
     protected long socket = 0;
     protected boolean async = false;
     protected SocketStatus status = SocketStatus.ERROR;
-    
+
     public SocketProcessor(long socket) {
        this.socket = socket;
        this.async = false;
@@(protected)
        }

     }
-    
+
  }
-  
-  
+
+
  // --------------------------------------- SocketEventProcessor Inner Class


@@(protected)
   * external Executor thread pool.
   */
  protected class SocketEventProcessor implements Runnable {
-    
+
     protected long socket = 0;
-     protected SocketStatus status = null;
-    
+     protected SocketStatus status = null;
+
     public SocketEventProcessor(long socket, SocketStatus status) {
        this.socket = socket;
        this.status = status;
@@(protected)
        }

     }
-    
+
  }
-  
+
  private static class PrivilegedSetTccl implements PrivilegedAction<Void> {

     private ClassLoader cl;
@@(protected)
        Thread.currentThread().setContextClassLoader(cl);
        return null;
     }
-   }  
+   }
}



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@(protected)
For additional commands, e-mail: dev-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.