From 6b3117292cebe55dccafaa8f452e631fff698427 Mon Sep 17 00:00:00 2001 From: yizhenqiang Date: Sun, 17 Dec 2023 11:20:10 +0800 Subject: [PATCH] ProtocolConfig Add sslEnabled and extProtocol fields, aligned with ProtocolConfig. --- .../bootstrap/builders/ProtocolBuilder.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/bootstrap/builders/ProtocolBuilder.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/bootstrap/builders/ProtocolBuilder.java index 9e8848570ff..cd247139fc5 100644 --- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/bootstrap/builders/ProtocolBuilder.java +++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/bootstrap/builders/ProtocolBuilder.java @@ -180,6 +180,13 @@ public class ProtocolBuilder extends AbstractBuilder parameters; + private Boolean sslEnabled; + + /* + * Extra Protocol for this service, using Port Unification Server + */ + private String extProtocol; + /** * If it's default */ @@ -375,6 +382,16 @@ public ProtocolBuilder appendParameters(Map appendParameters) { return getThis(); } + public ProtocolBuilder isSslEnabled(Boolean sslEnabled) { + this.sslEnabled = sslEnabled; + return getThis(); + } + + public ProtocolBuilder extProtocol(String extProtocol) { + this.extProtocol = extProtocol; + return getThis(); + } + public ProtocolBuilder isDefault(Boolean isDefault) { this.isDefault = isDefault; return getThis(); @@ -416,6 +433,8 @@ public ProtocolConfig build() { protocolConfig.setThreadpool(threadpool); protocolConfig.setThreads(threads); protocolConfig.setTransporter(transporter); + protocolConfig.setSslEnabled(sslEnabled); + protocolConfig.setExtProtocol(extProtocol); return protocolConfig; }