hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1235205 - in /httpcomponents/httpcore/trunk/httpcore-nio/src: main/java/org/apache/http/nio/protocol/ main/java/org/apache/http/nio/reactor/ main/java/org/apache/http/nio/reactor/ssl/ test/java/org/apache/http/nio/integration/ test/java/or...
Date Tue, 24 Jan 2012 11:22:06 GMT
Author: olegk
Date: Tue Jan 24 11:22:05 2012
New Revision: 1235205

URL: http://svn.apache.org/viewvc?rev=1235205&view=rev
Log:
TABS -> SPACES

Modified:
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequester.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/reactor/IOEventDispatch.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestPipelining.java
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncRequestExecutor.java

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequester.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequester.java?rev=1235205&r1=1235204&r2=1235205&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequester.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncRequester.java
Tue Jan 24 11:22:05 2012
@@ -45,8 +45,8 @@ import org.apache.http.protocol.HttpCont
 import org.apache.http.protocol.HttpProcessor;
 
 /**
- * <tt>HttpAsyncRequester</tt> is a utility class that can be used 
- * in conjunction with {@link HttpAsyncRequestExecutor} to initiate execution 
+ * <tt>HttpAsyncRequester</tt> is a utility class that can be used
+ * in conjunction with {@link HttpAsyncRequestExecutor} to initiate execution
  * of asynchronous HTTP requests.
  *
  * @see HttpAsyncRequestExecutor

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java?rev=1235205&r1=1235204&r2=1235205&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/protocol/HttpAsyncService.java
Tue Jan 24 11:22:05 2012
@@ -62,25 +62,25 @@ import org.apache.http.protocol.HttpCont
 import org.apache.http.protocol.HttpProcessor;
 
 /**
- * <tt>HttpAsyncService</tt> is a fully asynchronous HTTP server side protocol

+ * <tt>HttpAsyncService</tt> is a fully asynchronous HTTP server side protocol
  * handler based on the non-blocking (NIO) I/O model.
  * <tt>HttpAsyncServerProtocolHandler</tt> translates individual events fired
  * through the {@link NHttpServerEventHandler} interface into logically related
  * HTTP message exchanges.
  * <p/>
- * Upon receiving an incoming request <tt>HttpAsyncService</tt> verifies 
+ * Upon receiving an incoming request <tt>HttpAsyncService</tt> verifies
  * the message for compliance with the server expectations using
  * {@link HttpAsyncExpectationVerifier}, if provided, and then
- * {@link HttpAsyncRequestHandlerResolver} is used to resolve the request URI 
- * to a particular {@link HttpAsyncRequestHandler} intended to handle 
+ * {@link HttpAsyncRequestHandlerResolver} is used to resolve the request URI
+ * to a particular {@link HttpAsyncRequestHandler} intended to handle
  * the request with the given URI. The protocol handler uses the selected
  * {@link HttpAsyncRequestHandler} instance to process the incoming request
  * and to generate an outgoing response.
  * <p/>
- * <tt>HttpAsyncService</tt> relies on {@link HttpProcessor} to generate 
- * mandatory protocol headers for all outgoing messages and apply common, 
- * cross-cutting message transformations to all incoming and outgoing messages, 
- * whereas individual {@link HttpAsyncRequestHandler}s are expected 
+ * <tt>HttpAsyncService</tt> relies on {@link HttpProcessor} to generate
+ * mandatory protocol headers for all outgoing messages and apply common,
+ * cross-cutting message transformations to all incoming and outgoing messages,
+ * whereas individual {@link HttpAsyncRequestHandler}s are expected
  * to implement application specific content generation and processing.
  * <p/>
  * Individual {@link HttpAsyncRequestHandler}s do not have to submit a response

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/reactor/IOEventDispatch.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/reactor/IOEventDispatch.java?rev=1235205&r1=1235204&r2=1235205&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/reactor/IOEventDispatch.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/reactor/IOEventDispatch.java
Tue Jan 24 11:22:05 2012
@@ -43,7 +43,7 @@ public interface IOEventDispatch {
      * Attribute name of an object that represents a non-blocking connection.
      */
     public static final String CONNECTION_KEY = "http.connection";
-    
+
     /**
      * Triggered after the given session has been just created.
      *

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java?rev=1235205&r1=1235204&r2=1235205&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/reactor/ssl/SSLIOSession.java
Tue Jan 24 11:22:05 2012
@@ -47,18 +47,18 @@ import java.nio.channels.ByteChannel;
 import java.nio.channels.SelectionKey;
 
 /**
- * <tt>SSLIOSession</tt> is a decorator class intended to transparently extend

- * an {@link IOSession} with transport layer security capabilities based on 
+ * <tt>SSLIOSession</tt> is a decorator class intended to transparently extend
+ * an {@link IOSession} with transport layer security capabilities based on
  * the SSL/TLS protocol.
  * <p/>
- * The resultant instance of <tt>SSLIOSession</tt> must be added to the original

- * I/O session as an attribute with the {@link #SESSION_KEY} key.  
+ * The resultant instance of <tt>SSLIOSession</tt> must be added to the original
+ * I/O session as an attribute with the {@link #SESSION_KEY} key.
  * <pre>
  *  SSLContext sslcontext = SSLContext.getInstance("SSL");
  *  sslcontext.init(null, null, null);
  *  SSLIOSession sslsession = new SSLIOSession(
  *      iosession, SSLMode.CLIENT, sslcontext, null);
- *  iosession.setAttribute(SSLIOSession.SESSION_KEY, sslsession); 
+ *  iosession.setAttribute(SSLIOSession.SESSION_KEY, sslsession);
  * </pre>
  *
  * @since 4.2
@@ -91,7 +91,7 @@ public class SSLIOSession implements IOS
 
     /**
      * Creates new instance of <tt>SSLIOSession</tt> class.
-     *  
+     *
      * @param session I/O session to be decorated with the TLS/SSL capabilities.
      * @param defaultMode default mode (client or server)
      * @param sslContext SSL context to use for this I/O session.
@@ -143,19 +143,19 @@ public class SSLIOSession implements IOS
     }
 
     /**
-     * Returns <code>true</code> is the session has been fully initialized, 
-     * <code>false</code> otherwise. 
+     * Returns <code>true</code> is the session has been fully initialized,
+     * <code>false</code> otherwise.
      */
     public boolean isInitialized() {
         return this.initialized;
     }
 
     /**
-     * Initializes the session in the given {@link SSLMode}. This method 
+     * Initializes the session in the given {@link SSLMode}. This method
      * invokes the {@link SSLSetupHandler#initalize(SSLEngine)} callback
-     * if an instance of {@link SSLSetupHandler} was specified at 
+     * if an instance of {@link SSLSetupHandler} was specified at
      * the construction time.
-     * 
+     *
      * @param mode mode of operation (client or server).
      * @throws SSLException in case of a SSL protocol exception.
      * @throws IllegalStateException if the session has already been initialized.
@@ -184,11 +184,11 @@ public class SSLIOSession implements IOS
     }
 
     /**
-     * Initializes the session in the default operation mode. This method 
+     * Initializes the session in the default operation mode. This method
      * invokes the {@link SSLSetupHandler#initalize(SSLEngine)} callback
-     * if an instance of {@link SSLSetupHandler} was specified at 
+     * if an instance of {@link SSLSetupHandler} was specified at
      * the construction time.
-     * 
+     *
      * @throws SSLException in case of a SSL protocol exception.
      * @throws IllegalStateException if the session has already been initialized.
      */
@@ -355,9 +355,9 @@ public class SSLIOSession implements IOS
     }
 
     /**
-     * Reads encrypted data and returns whether the channel associated with 
+     * Reads encrypted data and returns whether the channel associated with
      * this session has any decrypted inbound data available for reading.
-     *  
+     *
      * @throws IOException in case of an I/O error.
      */
     public synchronized boolean isAppInputReady() throws IOException {
@@ -375,9 +375,9 @@ public class SSLIOSession implements IOS
     }
 
     /**
-     * Returns whether the channel associated with this session is ready to 
+     * Returns whether the channel associated with this session is ready to
      * accept outbound unecrypted data for writing.
-     *  
+     *
      * @throws IOException - not thrown currently
      */
     public synchronized boolean isAppOutputReady() throws IOException {
@@ -388,7 +388,7 @@ public class SSLIOSession implements IOS
 
     /**
      * Executes inbound SSL transport operations.
-     * 
+     *
      * @throws IOException - not thrown currently
      */
     public synchronized void inboundTransport() throws IOException {
@@ -397,7 +397,7 @@ public class SSLIOSession implements IOS
 
     /**
      * Sends encrypted data and executes outbound SSL transport operations.
-     * 
+     *
      * @throws IOException in case of an I/O error.
      */
     public synchronized void outboundTransport() throws IOException {
@@ -407,14 +407,14 @@ public class SSLIOSession implements IOS
     }
 
     /**
-     * Returns whether the session will produce any more inbound data. 
+     * Returns whether the session will produce any more inbound data.
      */
     public synchronized boolean isInboundDone() {
         return this.sslEngine.isInboundDone();
     }
 
     /**
-     * Returns whether the session will accept any more outbound data. 
+     * Returns whether the session will accept any more outbound data.
      */
     public synchronized boolean isOutboundDone() {
         return this.sslEngine.isOutboundDone();

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestPipelining.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestPipelining.java?rev=1235205&r1=1235204&r2=1235205&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestPipelining.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/integration/TestPipelining.java
Tue Jan 24 11:22:05 2012
@@ -118,7 +118,7 @@ public class TestPipelining extends Http
                 NStringEntity entity = NStringEntity.create(content, ContentType.DEFAULT_TEXT);
                 response.setEntity(entity);
             }
-            
+
         }));
         HttpAsyncService serviceHandler = new HttpAsyncService(
                 this.serverHttpProc,
@@ -131,7 +131,7 @@ public class TestPipelining extends Http
         endpoint.waitFor();
 
         Assert.assertEquals("Test server status", IOReactorStatus.ACTIVE, this.server.getStatus());
-        
+
         InetSocketAddress address = (InetSocketAddress) endpoint.getAddress();
         Socket socket = new Socket("localhost", address.getPort());
         try {
@@ -155,7 +155,7 @@ public class TestPipelining extends Http
             }
             reader.close();
             writer.close();
-            String expected = 
+            String expected =
                     "HTTP/1.1 200 OK\r\n" +
                     "Server: TEST-SERVER/1.1\r\n" +
                     "Content-Length: 19\r\n" +
@@ -170,11 +170,11 @@ public class TestPipelining extends Http
                     "\r\n" +
                     "thank you very much";
             Assert.assertEquals(expected, buf.toString());
-            
+
         } finally {
             socket.close();
         }
-        
+
     }
 
     @Test
@@ -190,7 +190,7 @@ public class TestPipelining extends Http
                 NStringEntity entity = NStringEntity.create(content, ContentType.DEFAULT_TEXT);
                 response.setEntity(entity);
             }
-            
+
         }));
         HttpAsyncService serviceHandler = new HttpAsyncService(
                 this.serverHttpProc,
@@ -203,7 +203,7 @@ public class TestPipelining extends Http
         endpoint.waitFor();
 
         Assert.assertEquals("Test server status", IOReactorStatus.ACTIVE, this.server.getStatus());
-        
+
         InetSocketAddress address = (InetSocketAddress) endpoint.getAddress();
         Socket socket = new Socket("localhost", address.getPort());
         try {
@@ -227,7 +227,7 @@ public class TestPipelining extends Http
             }
             reader.close();
             writer.close();
-            String expected = 
+            String expected =
                     "HTTP/1.1 200 OK\r\n" +
                     "Server: TEST-SERVER/1.1\r\n" +
                     "Content-Length: 19\r\n" +
@@ -241,18 +241,18 @@ public class TestPipelining extends Http
                     "\r\n" +
                     "thank you very much";
             Assert.assertEquals(expected, buf.toString());
-            
+
         } finally {
             socket.close();
         }
-        
+
     }
 
     @Test
     public void testPipeliningWithCancellable() throws Exception {
-        
+
         final Cancellable cancellable = Mockito.mock(Cancellable.class);
-        
+
         HttpAsyncRequestHandlerRegistry registry = new HttpAsyncRequestHandlerRegistry();
         registry.register("/long", new HttpAsyncRequestHandler<HttpRequest>() {
 
@@ -268,7 +268,7 @@ public class TestPipelining extends Http
                 httpexchange.setCallback(cancellable);
                 // do not submit a response;
             }
-            
+
         });
         registry.register("/short", new BasicAsyncRequestHandler(new HttpRequestHandler()
{
 
@@ -280,7 +280,7 @@ public class TestPipelining extends Http
                 NStringEntity entity = NStringEntity.create(content, ContentType.DEFAULT_TEXT);
                 response.setEntity(entity);
             }
-            
+
         }));
         HttpAsyncService serviceHandler = new HttpAsyncService(
                 this.serverHttpProc,
@@ -293,7 +293,7 @@ public class TestPipelining extends Http
         endpoint.waitFor();
 
         Assert.assertEquals("Test server status", IOReactorStatus.ACTIVE, this.server.getStatus());
-        
+
         InetSocketAddress address = (InetSocketAddress) endpoint.getAddress();
         Socket socket = new Socket("localhost", address.getPort());
         try {
@@ -317,8 +317,8 @@ public class TestPipelining extends Http
             }
             reader.close();
             writer.close();
-            
-            String expected = 
+
+            String expected =
                     "HTTP/1.1 400 Bad Request\r\n" +
                     "Connection: Close\r\n" +
                     "Server: TEST-SERVER/1.1\r\n" +
@@ -327,11 +327,11 @@ public class TestPipelining extends Http
                     "\r\n" +
                     "Out of sequence request message detected (pipelining is not supported)";
             Assert.assertEquals(expected, buf.toString());
-            
+
         } finally {
             socket.close();
         }
-        
+
         Mockito.verify(cancellable).cancel();
     }
 

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncRequestExecutor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncRequestExecutor.java?rev=1235205&r1=1235204&r2=1235205&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncRequestExecutor.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/nio/protocol/TestHttpAsyncRequestExecutor.java
Tue Jan 24 11:22:05 2012
@@ -170,12 +170,12 @@ public class TestHttpAsyncRequestExecuto
 
         Mockito.verify(this.exchangeHandler).generateRequest();
         Assert.assertSame(request, state.getRequest());
-        
+
         Assert.assertSame(request, this.exchangeContext.getAttribute(ExecutionContext.HTTP_REQUEST));
         Assert.assertSame(this.conn, this.exchangeContext.getAttribute(ExecutionContext.HTTP_CONNECTION));
         Mockito.verify(this.httpprocessor).process(request, this.exchangeContext);
-        
-        
+
+
         Mockito.verify(this.conn).submitRequest(request);
         Mockito.verify(this.exchangeHandler).requestCompleted(this.exchangeContext);
         Assert.assertEquals(MessageState.COMPLETED, state.getRequestState());



Mime
View raw message