You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by mi...@apache.org on 2020/07/31 18:44:39 UTC

[httpcomponents-core] branch master updated: Revert "HTTPCORE-642: Implement ConnectionFactory fluent builders"

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 0c8886c  Revert "HTTPCORE-642: Implement ConnectionFactory fluent builders"
0c8886c is described below

commit 0c8886cf246aafd1e0a7f01e051492367a4aed6c
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Fri Jul 31 20:44:20 2020 +0200

    Revert "HTTPCORE-642: Implement ConnectionFactory fluent builders"
    
    This reverts commit d2afcc67fb33f2d455d6600b96660d87abc0111f.
---
 .../io/DefaultBHttpClientConnectionFactory.java    | 66 -------------------
 .../io/DefaultBHttpServerConnectionFactory.java    | 73 ----------------------
 2 files changed, 139 deletions(-)

diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/DefaultBHttpClientConnectionFactory.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/DefaultBHttpClientConnectionFactory.java
index a2d460b..e9781df 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/DefaultBHttpClientConnectionFactory.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/DefaultBHttpClientConnectionFactory.java
@@ -106,70 +106,4 @@ public class DefaultBHttpClientConnectionFactory
         return conn;
     }
 
-    /**
-     * Create a new {@link Builder}.
-     *
-     * @since 5.0.2
-     */
-    public static Builder builder() {
-        return new Builder();
-    }
-
-    /**
-     * Builder for {@link DefaultBHttpClientConnectionFactory}.
-     *
-     * @since 5.0.2
-     */
-    public static final class Builder {
-        private Http1Config http1Config;
-        private CharCodingConfig charCodingConfig;
-        private ContentLengthStrategy incomingContentStrategy;
-        private ContentLengthStrategy outgoingContentStrategy;
-        private HttpMessageWriterFactory<ClassicHttpRequest> requestWriterFactory;
-        private HttpMessageParserFactory<ClassicHttpResponse> responseParserFactory;
-
-        private Builder() {}
-
-        public Builder http1Config(final Http1Config http1Config) {
-            this.http1Config = http1Config;
-            return this;
-        }
-
-        public Builder charCodingConfig(final CharCodingConfig charCodingConfig) {
-            this.charCodingConfig = charCodingConfig;
-            return this;
-        }
-
-        public Builder incomingContentStrategy(final ContentLengthStrategy incomingContentStrategy) {
-            this.incomingContentStrategy = incomingContentStrategy;
-            return this;
-        }
-
-        public Builder outgoingContentStrategy(final ContentLengthStrategy outgoingContentStrategy) {
-            this.outgoingContentStrategy = outgoingContentStrategy;
-            return this;
-        }
-
-        public Builder requestWriterFactory(
-                final HttpMessageWriterFactory<ClassicHttpRequest> requestWriterFactory) {
-            this.requestWriterFactory = requestWriterFactory;
-            return this;
-        }
-
-        public Builder responseParserFactory(
-                final HttpMessageParserFactory<ClassicHttpResponse> responseParserFactory) {
-            this.responseParserFactory = responseParserFactory;
-            return this;
-        }
-
-        public DefaultBHttpClientConnectionFactory build() {
-            return new DefaultBHttpClientConnectionFactory(
-                    http1Config,
-                    charCodingConfig,
-                    incomingContentStrategy,
-                    outgoingContentStrategy,
-                    requestWriterFactory,
-                    responseParserFactory);
-        }
-    }
 }
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/DefaultBHttpServerConnectionFactory.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/DefaultBHttpServerConnectionFactory.java
index 111145b..d74c528 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/DefaultBHttpServerConnectionFactory.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/DefaultBHttpServerConnectionFactory.java
@@ -107,77 +107,4 @@ public class DefaultBHttpServerConnectionFactory implements HttpConnectionFactor
         return conn;
     }
 
-    /**
-     * Create a new {@link Builder}.
-     *
-     * @since 5.0.2
-     */
-    public static Builder builder() {
-        return new Builder();
-    }
-
-    /**
-     * Builder for {@link DefaultBHttpServerConnectionFactory}.
-     *
-     * @since 5.0.2
-     */
-    public static final class Builder {
-        private String scheme;
-        private Http1Config http1Config;
-        private CharCodingConfig charCodingConfig;
-        private ContentLengthStrategy incomingContentStrategy;
-        private ContentLengthStrategy outgoingContentStrategy;
-        private HttpMessageParserFactory<ClassicHttpRequest> requestParserFactory;
-        private HttpMessageWriterFactory<ClassicHttpResponse> responseWriterFactory;
-
-        private Builder() {}
-
-        public Builder scheme(final String scheme) {
-            this.scheme = scheme;
-            return this;
-        }
-
-        public Builder http1Config(final Http1Config http1Config) {
-            this.http1Config = http1Config;
-            return this;
-        }
-
-        public Builder charCodingConfig(final CharCodingConfig charCodingConfig) {
-            this.charCodingConfig = charCodingConfig;
-            return this;
-        }
-
-        public Builder incomingContentStrategy(final ContentLengthStrategy incomingContentStrategy) {
-            this.incomingContentStrategy = incomingContentStrategy;
-            return this;
-        }
-
-        public Builder outgoingContentStrategy(final ContentLengthStrategy outgoingContentStrategy) {
-            this.outgoingContentStrategy = outgoingContentStrategy;
-            return this;
-        }
-
-        public Builder requestParserFactory(
-                final HttpMessageParserFactory<ClassicHttpRequest> requestParserFactory) {
-            this.requestParserFactory = requestParserFactory;
-            return this;
-        }
-
-        public Builder responseWriterFactory(
-                final HttpMessageWriterFactory<ClassicHttpResponse> responseWriterFactory) {
-            this.responseWriterFactory = responseWriterFactory;
-            return this;
-        }
-
-        public DefaultBHttpServerConnectionFactory build() {
-            return new DefaultBHttpServerConnectionFactory(
-                    scheme,
-                    http1Config,
-                    charCodingConfig,
-                    incomingContentStrategy,
-                    outgoingContentStrategy,
-                    requestParserFactory,
-                    responseWriterFactory);
-        }
-    }
 }