hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject httpcomponents-core git commit: Added #isRepeatable method to AsyncRequestProducer [Forced Update!]
Date Mon, 06 Nov 2017 17:42:26 GMT
Repository: httpcomponents-core
Updated Branches:
  refs/heads/master 57802047a -> 635437371 (forced update)


Added #isRepeatable method to AsyncRequestProducer


Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/63543737
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/63543737
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/63543737

Branch: refs/heads/master
Commit: 635437371ed40f4f2bd4b2dd46dccc2dde7a8209
Parents: b70a294
Author: Oleg Kalnichevski <olegk@apache.org>
Authored: Sun Nov 5 19:48:39 2017 +0100
Committer: Oleg Kalnichevski <olegk@apache.org>
Committed: Mon Nov 6 18:39:16 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/hc/core5/http/nio/AsyncRequestProducer.java | 2 ++
 .../java/org/apache/hc/core5/http/nio/BasicRequestProducer.java | 5 +++++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/63543737/httpcore5/src/main/java/org/apache/hc/core5/http/nio/AsyncRequestProducer.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/AsyncRequestProducer.java
b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/AsyncRequestProducer.java
index 71d0e8f..d215b91 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/AsyncRequestProducer.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/AsyncRequestProducer.java
@@ -39,6 +39,8 @@ public interface AsyncRequestProducer extends AsyncDataProducer {
 
     void sendRequest(RequestChannel requestChannel) throws HttpException, IOException;
 
+    boolean isRepeatable();
+
     void failed(Exception cause);
 
 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/63543737/httpcore5/src/main/java/org/apache/hc/core5/http/nio/BasicRequestProducer.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/BasicRequestProducer.java
b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/BasicRequestProducer.java
index 4e22f7a..e230a6b 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/BasicRequestProducer.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/BasicRequestProducer.java
@@ -78,6 +78,11 @@ public class BasicRequestProducer implements AsyncRequestProducer {
     }
 
     @Override
+    public boolean isRepeatable() {
+        return dataProducer == null || dataProducer.isRepeatable();
+    }
+
+    @Override
     public void failed(final Exception cause) {
         try {
             if (dataProducer != null) {


Mime
View raw message