hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1762693 - in /httpcomponents/httpcore/trunk/httpcore5-h2/src: main/java/org/apache/hc/core5/http2/impl/nio/ main/java/org/apache/hc/core5/http2/impl/nio/entity/ main/java/org/apache/hc/core5/http2/nio/ main/java/org/apache/hc/core5/http2/n...
Date Wed, 28 Sep 2016 17:27:34 GMT
Author: olegk
Date: Wed Sep 28 17:27:34 2016
New Revision: 1762693

URL: http://svn.apache.org/viewvc?rev=1762693&view=rev
Log:
Moved 'classic' I/O adapters to impl package; imprevements / cleanups in basic implementations
of async handlers

Added:
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractClassicServerExchangeHandler.java
  (contents, props changed)
      - copied, changed from r1762692, httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/AbstractClassicServerExchangeHandler.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractClassicEntityConsumer.java
  (contents, props changed)
      - copied, changed from r1762692, httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/AbstractClassicEntityConsumer.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractClassicEntityProducer.java
  (contents, props changed)
      - copied, changed from r1762692, httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/AbstractClassicEntityProducer.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractSharedBuffer.java
  (contents, props changed)
      - copied, changed from r1762692, httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/AbstractSharedBuffer.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/SharedInputBuffer.java
  (contents, props changed)
      - copied, changed from r1762692, httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/SharedInputBuffer.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/SharedOutputBuffer.java
  (contents, props changed)
      - copied, changed from r1762692, httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/SharedOutputBuffer.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicAsyncPushHandler.java
  (contents, props changed)
      - copied, changed from r1762692, httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/AbstractAsyncPushHandler.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicServerExchangeHandler.java
  (contents, props changed)
      - copied, changed from r1762692, httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/AbstractAsyncServerExchangeHandler.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/impl/nio/entity/
    httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/impl/nio/entity/TestSharedInputBuffer.java
  (contents, props changed)
      - copied, changed from r1762692, httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/nio/entity/TestSharedInputBuffer.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/impl/nio/entity/TestSharedOutputBuffer.java
  (contents, props changed)
      - copied, changed from r1762692, httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/nio/entity/TestSharedOutputBuffer.java
Removed:
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/AbstractAsyncPushHandler.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/AbstractAsyncServerExchangeHandler.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/AbstractClassicServerExchangeHandler.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/AbstractClassicEntityConsumer.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/AbstractClassicEntityProducer.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/AbstractSharedBuffer.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/SharedInputBuffer.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/SharedOutputBuffer.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/nio/entity/TestSharedInputBuffer.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/nio/entity/TestSharedOutputBuffer.java
Modified:
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicClientExchangeHandler.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/FixedResponseExchangeHandler.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/integration/Http2IntegrationTest.java

Copied: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractClassicServerExchangeHandler.java
(from r1762692, httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/AbstractClassicServerExchangeHandler.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractClassicServerExchangeHandler.java?p2=httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractClassicServerExchangeHandler.java&p1=httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/AbstractClassicServerExchangeHandler.java&r1=1762692&r2=1762693&rev=1762693&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/AbstractClassicServerExchangeHandler.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractClassicServerExchangeHandler.java
Wed Sep 28 17:27:34 2016
@@ -24,7 +24,7 @@
  * <http://www.apache.org/>.
  *
  */
-package org.apache.hc.core5.http2.nio;
+package org.apache.hc.core5.http2.impl.nio;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -49,8 +49,13 @@ import org.apache.hc.core5.http.message.
 import org.apache.hc.core5.http.message.HttpResponseWrapper;
 import org.apache.hc.core5.http.nio.entity.ContentInputStream;
 import org.apache.hc.core5.http.nio.entity.ContentOutputStream;
-import org.apache.hc.core5.http2.nio.entity.SharedInputBuffer;
-import org.apache.hc.core5.http2.nio.entity.SharedOutputBuffer;
+import org.apache.hc.core5.http2.nio.AsyncServerExchangeHandler;
+import org.apache.hc.core5.http2.nio.CapacityChannel;
+import org.apache.hc.core5.http2.nio.DataStreamChannel;
+import org.apache.hc.core5.http2.nio.ExpectationChannel;
+import org.apache.hc.core5.http2.nio.ResponseChannel;
+import org.apache.hc.core5.http2.impl.nio.entity.SharedInputBuffer;
+import org.apache.hc.core5.http2.impl.nio.entity.SharedOutputBuffer;
 import org.apache.hc.core5.util.Args;
 import org.apache.hc.core5.util.Asserts;
 
@@ -85,7 +90,7 @@ public abstract class AbstractClassicSer
             HttpResponse response, OutputStream responseStream) throws IOException, HttpException;
 
     @Override
-    public void verify(
+    public final void verify(
             final HttpRequest request,
             final EntityDetails entityDetails,
             final ExpectationChannel expectationChannel) throws HttpException, IOException
{
@@ -248,7 +253,7 @@ public abstract class AbstractClassicSer
     }
 
     @Override
-    public int capacity() {
+    public final int capacity() {
         return inputBuffer != null ? inputBuffer.available() : 0;
     }
 
@@ -272,7 +277,7 @@ public abstract class AbstractClassicSer
     }
 
     @Override
-    public int available() {
+    public final int available() {
         Asserts.notNull(outputBuffer, "Output buffer");
         return outputBuffer.length();
     }
@@ -284,7 +289,7 @@ public abstract class AbstractClassicSer
     }
 
     @Override
-    public void failed(final Exception cause) {
+    public final void failed(final Exception cause) {
         exception.compareAndSet(null, cause);
         releaseResources();
     }

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractClassicServerExchangeHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractClassicServerExchangeHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractClassicServerExchangeHandler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractClassicEntityConsumer.java
(from r1762692, httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/AbstractClassicEntityConsumer.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractClassicEntityConsumer.java?p2=httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractClassicEntityConsumer.java&p1=httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/AbstractClassicEntityConsumer.java&r1=1762692&r2=1762693&rev=1762693&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/AbstractClassicEntityConsumer.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractClassicEntityConsumer.java
Wed Sep 28 17:27:34 2016
@@ -24,7 +24,7 @@
  * <http://www.apache.org/>.
  *
  */
-package org.apache.hc.core5.http2.nio.entity;
+package org.apache.hc.core5.http2.impl.nio.entity;
 
 import java.io.IOException;
 import java.io.InputStream;

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractClassicEntityConsumer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractClassicEntityConsumer.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractClassicEntityConsumer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractClassicEntityProducer.java
(from r1762692, httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/AbstractClassicEntityProducer.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractClassicEntityProducer.java?p2=httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractClassicEntityProducer.java&p1=httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/AbstractClassicEntityProducer.java&r1=1762692&r2=1762693&rev=1762693&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/AbstractClassicEntityProducer.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractClassicEntityProducer.java
Wed Sep 28 17:27:34 2016
@@ -24,7 +24,7 @@
  * <http://www.apache.org/>.
  *
  */
-package org.apache.hc.core5.http2.nio.entity;
+package org.apache.hc.core5.http2.impl.nio.entity;
 
 import java.io.IOException;
 import java.io.OutputStream;
@@ -82,7 +82,7 @@ public abstract class AbstractClassicEnt
     }
 
     @Override
-    public int available() {
+    public final int available() {
         return buffer.length();
     }
 
@@ -92,7 +92,7 @@ public abstract class AbstractClassicEnt
     }
 
     @Override
-    public long getContentLength() {
+    public final long getContentLength() {
         return -1;
     }
 
@@ -107,12 +107,12 @@ public abstract class AbstractClassicEnt
     }
 
     @Override
-    public boolean isChunked() {
+    public final boolean isChunked() {
         return false;
     }
 
     @Override
-    public Set<String> getTrailerNames() {
+    public final Set<String> getTrailerNames() {
         return null;
     }
 

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractClassicEntityProducer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractClassicEntityProducer.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractClassicEntityProducer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractSharedBuffer.java
(from r1762692, httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/AbstractSharedBuffer.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractSharedBuffer.java?p2=httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractSharedBuffer.java&p1=httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/AbstractSharedBuffer.java&r1=1762692&r2=1762693&rev=1762693&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/AbstractSharedBuffer.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractSharedBuffer.java
Wed Sep 28 17:27:34 2016
@@ -24,7 +24,7 @@
  * <http://www.apache.org/>.
  *
  */
-package org.apache.hc.core5.http2.nio.entity;
+package org.apache.hc.core5.http2.impl.nio.entity;
 
 import java.util.concurrent.locks.Condition;
 import java.util.concurrent.locks.ReentrantLock;

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractSharedBuffer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractSharedBuffer.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/AbstractSharedBuffer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/SharedInputBuffer.java
(from r1762692, httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/SharedInputBuffer.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/SharedInputBuffer.java?p2=httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/SharedInputBuffer.java&p1=httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/SharedInputBuffer.java&r1=1762692&r2=1762693&rev=1762693&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/SharedInputBuffer.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/SharedInputBuffer.java
Wed Sep 28 17:27:34 2016
@@ -24,7 +24,7 @@
  * <http://www.apache.org/>.
  *
  */
-package org.apache.hc.core5.http2.nio.entity;
+package org.apache.hc.core5.http2.impl.nio.entity;
 
 import java.io.IOException;
 import java.io.InterruptedIOException;

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/SharedInputBuffer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/SharedInputBuffer.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/SharedInputBuffer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/SharedOutputBuffer.java
(from r1762692, httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/SharedOutputBuffer.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/SharedOutputBuffer.java?p2=httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/SharedOutputBuffer.java&p1=httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/SharedOutputBuffer.java&r1=1762692&r2=1762693&rev=1762693&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/entity/SharedOutputBuffer.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/SharedOutputBuffer.java
Wed Sep 28 17:27:34 2016
@@ -24,7 +24,7 @@
  * <http://www.apache.org/>.
  *
  */
-package org.apache.hc.core5.http2.nio.entity;
+package org.apache.hc.core5.http2.impl.nio.entity;
 
 import java.io.IOException;
 import java.io.InterruptedIOException;

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/SharedOutputBuffer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/SharedOutputBuffer.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/entity/SharedOutputBuffer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicAsyncPushHandler.java
(from r1762692, httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/AbstractAsyncPushHandler.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicAsyncPushHandler.java?p2=httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicAsyncPushHandler.java&p1=httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/AbstractAsyncPushHandler.java&r1=1762692&r2=1762693&rev=1762693&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/AbstractAsyncPushHandler.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicAsyncPushHandler.java
Wed Sep 28 17:27:34 2016
@@ -43,17 +43,19 @@ import org.apache.hc.core5.util.Args;
 /**
  * @since 5.0
  */
-public abstract class AbstractAsyncPushHandler<T> implements AsyncPushConsumer {
+public class BasicAsyncPushHandler<T> implements AsyncPushConsumer {
 
     private final AsyncResponseConsumer<Message<HttpResponse, T>> responseConsumer;
     private final AtomicReference<Exception> exception;
 
-    public AbstractAsyncPushHandler(final AsyncResponseConsumer<Message<HttpResponse,
T>> responseConsumer) {
+    public BasicAsyncPushHandler(final AsyncResponseConsumer<Message<HttpResponse,
T>> responseConsumer) {
         this.responseConsumer = Args.notNull(responseConsumer, "Response consumer");
         this.exception = new AtomicReference<>(null);
     }
 
-    protected abstract void handleResponse(HttpRequest promise, Message<HttpResponse,
T> responseMessage) throws IOException, HttpException;
+    protected void handleResponse(
+            final HttpRequest promise, final Message<HttpResponse, T> responseMessage)
throws IOException, HttpException {
+    }
 
     @Override
     public void consumePromise(

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicAsyncPushHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicAsyncPushHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicAsyncPushHandler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicClientExchangeHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicClientExchangeHandler.java?rev=1762693&r1=1762692&r2=1762693&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicClientExchangeHandler.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicClientExchangeHandler.java
Wed Sep 28 17:27:34 2016
@@ -43,7 +43,7 @@ import org.apache.hc.core5.util.Args;
 /**
  * @since 5.0
  */
-public class BasicClientExchangeHandler<T> implements AsyncClientExchangeHandler{
+public class BasicClientExchangeHandler<T> implements AsyncClientExchangeHandler {
 
     private final AsyncRequestProducer requestProducer;
     private final AsyncResponseConsumer<T> responseConsumer;

Copied: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicServerExchangeHandler.java
(from r1762692, httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/AbstractAsyncServerExchangeHandler.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicServerExchangeHandler.java?p2=httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicServerExchangeHandler.java&p1=httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/AbstractAsyncServerExchangeHandler.java&r1=1762692&r2=1762693&rev=1762693&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/AbstractAsyncServerExchangeHandler.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicServerExchangeHandler.java
Wed Sep 28 17:27:34 2016
@@ -45,19 +45,19 @@ import org.apache.hc.core5.util.Asserts;
 /**
  * @since 5.0
  */
-public abstract class AbstractAsyncServerExchangeHandler<T> implements AsyncServerExchangeHandler
{
+public class BasicServerExchangeHandler<T> implements AsyncServerExchangeHandler {
 
     private final AsyncRequestConsumer<Message<HttpRequest, T>> requestConsumer;
     private final AtomicReference<AsyncResponseProducer> responseProducer;
     private final AtomicBoolean dataStarted;
 
-    public AbstractAsyncServerExchangeHandler(final AsyncRequestConsumer<Message<HttpRequest,
T>> requestConsumer) {
+    public BasicServerExchangeHandler(final AsyncRequestConsumer<Message<HttpRequest,
T>> requestConsumer) {
         this.requestConsumer = Args.notNull(requestConsumer, "Request consumer");
         this.responseProducer = new AtomicReference<>(null);
         this.dataStarted = new AtomicBoolean(false);
     }
 
-    public AbstractAsyncServerExchangeHandler(final AsyncEntityConsumer<T> requestEntityConsumer)
{
+    public BasicServerExchangeHandler(final AsyncEntityConsumer<T> requestEntityConsumer)
{
         this(new BasicRequestConsumer<>(requestEntityConsumer));
     }
 
@@ -65,7 +65,10 @@ public abstract class AbstractAsyncServe
         return null;
     }
 
-    protected abstract void handle(Message<HttpRequest, T> request, AsyncResponseTrigger
responseTrigger) throws IOException, HttpException;
+    protected void handle(
+            final Message<HttpRequest, T> request, final AsyncResponseTrigger responseTrigger)
throws IOException, HttpException {
+        responseTrigger.submitResponse(new BasicResponseProducer(HttpStatus.SC_OK, "OK"));
+    }
 
     @Override
     public final void verify(
@@ -133,7 +136,7 @@ public abstract class AbstractAsyncServe
 
             @Override
             public void failed(final Exception ex) {
-                AbstractAsyncServerExchangeHandler.this.failed(ex);
+                BasicServerExchangeHandler.this.failed(ex);
                 releaseResources();
             }
 
@@ -147,7 +150,7 @@ public abstract class AbstractAsyncServe
     }
 
     @Override
-    public int capacity() {
+    public final int capacity() {
         return requestConsumer.capacity();
     }
 

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicServerExchangeHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicServerExchangeHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/BasicServerExchangeHandler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/FixedResponseExchangeHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/FixedResponseExchangeHandler.java?rev=1762693&r1=1762692&r2=1762693&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/FixedResponseExchangeHandler.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/FixedResponseExchangeHandler.java
Wed Sep 28 17:27:34 2016
@@ -41,7 +41,7 @@ import org.apache.hc.core5.util.Args;
 /**
  * @since 5.0
  */
-public final class FixedResponseExchangeHandler extends AbstractAsyncServerExchangeHandler<Void>
{
+public final class FixedResponseExchangeHandler extends BasicServerExchangeHandler<Void>
{
 
     private final AsyncResponseProducer responseProducer;
 

Copied: httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/impl/nio/entity/TestSharedInputBuffer.java
(from r1762692, httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/nio/entity/TestSharedInputBuffer.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/impl/nio/entity/TestSharedInputBuffer.java?p2=httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/impl/nio/entity/TestSharedInputBuffer.java&p1=httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/nio/entity/TestSharedInputBuffer.java&r1=1762692&r2=1762693&rev=1762693&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/nio/entity/TestSharedInputBuffer.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/impl/nio/entity/TestSharedInputBuffer.java
Wed Sep 28 17:27:34 2016
@@ -25,7 +25,7 @@
  *
  */
 
-package org.apache.hc.core5.http2.nio.entity;
+package org.apache.hc.core5.http2.impl.nio.entity;
 
 import java.nio.ByteBuffer;
 import java.nio.charset.Charset;

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/impl/nio/entity/TestSharedInputBuffer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/impl/nio/entity/TestSharedInputBuffer.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/impl/nio/entity/TestSharedInputBuffer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/impl/nio/entity/TestSharedOutputBuffer.java
(from r1762692, httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/nio/entity/TestSharedOutputBuffer.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/impl/nio/entity/TestSharedOutputBuffer.java?p2=httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/impl/nio/entity/TestSharedOutputBuffer.java&p1=httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/nio/entity/TestSharedOutputBuffer.java&r1=1762692&r2=1762693&rev=1762693&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/nio/entity/TestSharedOutputBuffer.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/impl/nio/entity/TestSharedOutputBuffer.java
Wed Sep 28 17:27:34 2016
@@ -25,7 +25,7 @@
  *
  */
 
-package org.apache.hc.core5.http2.nio.entity;
+package org.apache.hc.core5.http2.impl.nio.entity;
 
 import java.io.IOException;
 import java.io.InterruptedIOException;

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/impl/nio/entity/TestSharedOutputBuffer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/impl/nio/entity/TestSharedOutputBuffer.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/impl/nio/entity/TestSharedOutputBuffer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/integration/Http2IntegrationTest.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/integration/Http2IntegrationTest.java?rev=1762693&r1=1762692&r2=1762693&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/integration/Http2IntegrationTest.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/integration/Http2IntegrationTest.java
Wed Sep 28 17:27:34 2016
@@ -68,9 +68,9 @@ import org.apache.hc.core5.http.message.
 import org.apache.hc.core5.http2.H2Error;
 import org.apache.hc.core5.http2.H2StreamResetException;
 import org.apache.hc.core5.http2.config.H2Config;
-import org.apache.hc.core5.http2.nio.AbstractAsyncPushHandler;
-import org.apache.hc.core5.http2.nio.AbstractAsyncServerExchangeHandler;
-import org.apache.hc.core5.http2.nio.AbstractClassicServerExchangeHandler;
+import org.apache.hc.core5.http2.nio.BasicAsyncPushHandler;
+import org.apache.hc.core5.http2.nio.BasicServerExchangeHandler;
+import org.apache.hc.core5.http2.impl.nio.AbstractClassicServerExchangeHandler;
 import org.apache.hc.core5.http2.nio.AsyncPushConsumer;
 import org.apache.hc.core5.http2.nio.AsyncResponseProducer;
 import org.apache.hc.core5.http2.nio.AsyncResponseTrigger;
@@ -87,8 +87,8 @@ import org.apache.hc.core5.http2.nio.Str
 import org.apache.hc.core5.http2.nio.Supplier;
 import org.apache.hc.core5.http2.nio.command.ClientCommandEndpoint;
 import org.apache.hc.core5.http2.nio.entity.AbstractCharAsyncEntityProducer;
-import org.apache.hc.core5.http2.nio.entity.AbstractClassicEntityConsumer;
-import org.apache.hc.core5.http2.nio.entity.AbstractClassicEntityProducer;
+import org.apache.hc.core5.http2.impl.nio.entity.AbstractClassicEntityConsumer;
+import org.apache.hc.core5.http2.impl.nio.entity.AbstractClassicEntityProducer;
 import org.apache.hc.core5.http2.nio.entity.NoopEntityConsumer;
 import org.apache.hc.core5.http2.nio.entity.StringAsyncEntityConsumer;
 import org.apache.hc.core5.http2.nio.entity.StringAsyncEntityProducer;
@@ -129,7 +129,7 @@ public class Http2IntegrationTest extend
 
     }
 
-    static class SingleLineResponseHandler extends AbstractAsyncServerExchangeHandler<String>
{
+    static class SingleLineResponseHandler extends BasicServerExchangeHandler<String>
{
 
         private final String message;
 
@@ -230,7 +230,7 @@ public class Http2IntegrationTest extend
 
     }
 
-    static class MultiLineResponseHandler extends AbstractAsyncServerExchangeHandler<String>
{
+    static class MultiLineResponseHandler extends BasicServerExchangeHandler<String>
{
 
         private final String message;
         private final int count;
@@ -687,7 +687,9 @@ public class Http2IntegrationTest extend
 
             @Override
             public AsyncServerExchangeHandler get() {
-                return new AbstractAsyncServerExchangeHandler<Void>(new NoopEntityConsumer())
{
+                return new BasicServerExchangeHandler<Void>(new NoopEntityConsumer())
{
+
+
 
                     @Override
                     protected void handle(
@@ -713,7 +715,7 @@ public class Http2IntegrationTest extend
 
             @Override
             public AsyncPushConsumer get() {
-                return new AbstractAsyncPushHandler<String>(new BasicResponseConsumer<>(new
StringAsyncEntityConsumer())) {
+                return new BasicAsyncPushHandler<String>(new BasicResponseConsumer<>(new
StringAsyncEntityConsumer())) {
 
                     @Override
                     protected void handleResponse(
@@ -766,7 +768,7 @@ public class Http2IntegrationTest extend
 
             @Override
             public AsyncServerExchangeHandler get() {
-                return new AbstractAsyncServerExchangeHandler<Void>(new NoopEntityConsumer())
{
+                return new BasicServerExchangeHandler<Void>(new NoopEntityConsumer())
{
 
                     @Override
                     protected void handle(
@@ -872,7 +874,7 @@ public class Http2IntegrationTest extend
 
             @Override
             public AsyncServerExchangeHandler get() {
-                return new AbstractAsyncServerExchangeHandler<String>(new StringAsyncEntityConsumer())
{
+                return new BasicServerExchangeHandler<String>(new StringAsyncEntityConsumer())
{
 
                     @Override
                     protected AsyncResponseProducer verify(final HttpRequest request) throws
IOException, HttpException {




Mime
View raw message