This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.0 by this push:
new 1bc5e623c0 Fix protocol unable to specify from ConsumerConfig (#10418)
1bc5e623c0 is described below
commit 1bc5e623c0efcb945d5d8e2bf70c05eafc32c659
Author: Albumen Kevin <[email protected]>
AuthorDate: Tue Aug 9 09:55:59 2022 +0800
Fix protocol unable to specify from ConsumerConfig (#10418)
---
.../dubbo/config/AbstractReferenceConfig.java | 26 ++++++++++++++++++++++
.../org/apache/dubbo/config/ConsumerConfig.java | 13 -----------
.../apache/dubbo/config/ReferenceConfigBase.java | 26 ----------------------
3 files changed, 26 insertions(+), 39 deletions(-)
diff --git
a/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractReferenceConfig.java
b/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractReferenceConfig.java
index dc0e897881..dcada0ce1d 100644
---
a/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractReferenceConfig.java
+++
b/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractReferenceConfig.java
@@ -92,6 +92,16 @@ public abstract class AbstractReferenceConfig extends
AbstractInterfaceConfig {
@Deprecated
private Boolean referAsync;
+ /**
+ * client type
+ */
+ protected String client;
+
+ /**
+ * Only the service provider of the specified protocol is invoked, and
other protocols are ignored.
+ */
+ protected String protocol;
+
public AbstractReferenceConfig() {
}
@@ -267,4 +277,20 @@ public abstract class AbstractReferenceConfig extends
AbstractInterfaceConfig {
public void setReferAsync(Boolean referAsync) {
this.referAsync = referAsync;
}
+
+ public String getClient() {
+ return client;
+ }
+
+ public void setClient(String client) {
+ this.client = client;
+ }
+
+ public String getProtocol() {
+ return protocol;
+ }
+
+ public void setProtocol(String protocol) {
+ this.protocol = protocol;
+ }
}
diff --git
a/dubbo-common/src/main/java/org/apache/dubbo/config/ConsumerConfig.java
b/dubbo-common/src/main/java/org/apache/dubbo/config/ConsumerConfig.java
index 8f6e2784f4..a3c3726e6c 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/config/ConsumerConfig.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/config/ConsumerConfig.java
@@ -33,11 +33,6 @@ public class ConsumerConfig extends AbstractReferenceConfig {
private static final long serialVersionUID = 2827274711143680600L;
- /**
- * Networking framework client uses: netty, mina, etc.
- */
- private String client;
-
/**
* Consumer thread pool type: cached, fixed, limit, eager
*/
@@ -100,14 +95,6 @@ public class ConsumerConfig extends AbstractReferenceConfig
{
System.setProperty("sun.rmi.transport.tcp.responseTimeout",
String.valueOf(timeout));
}
}
-
- public String getClient() {
- return client;
- }
-
- public void setClient(String client) {
- this.client = client;
- }
public String getThreadpool() {
return threadpool;
diff --git
a/dubbo-common/src/main/java/org/apache/dubbo/config/ReferenceConfigBase.java
b/dubbo-common/src/main/java/org/apache/dubbo/config/ReferenceConfigBase.java
index e2c18094db..73a668a834 100644
---
a/dubbo-common/src/main/java/org/apache/dubbo/config/ReferenceConfigBase.java
+++
b/dubbo-common/src/main/java/org/apache/dubbo/config/ReferenceConfigBase.java
@@ -55,10 +55,6 @@ public abstract class ReferenceConfigBase<T> extends
AbstractReferenceConfig {
*/
protected Class<?> interfaceClass;
- /**
- * client type
- */
- protected String client;
/**
* The url for peer-to-peer invocation
@@ -70,12 +66,6 @@ public abstract class ReferenceConfigBase<T> extends
AbstractReferenceConfig {
*/
protected ConsumerConfig consumer;
- /**
- * Only the service provider of the specified protocol is invoked, and
other protocols are ignored.
- */
- protected String protocol;
-
-
public ReferenceConfigBase() {
serviceMetadata = new ServiceMetadata();
serviceMetadata.addAttribute(ORIGIN_CONFIG, this);
@@ -250,14 +240,6 @@ public abstract class ReferenceConfigBase<T> extends
AbstractReferenceConfig {
setInterfaceClassLoader(interfaceClass == null ? null :
interfaceClass.getClassLoader());
}
- public String getClient() {
- return client;
- }
-
- public void setClient(String client) {
- this.client = client;
- }
-
@Parameter(excluded = true)
public String getUrl() {
return url;
@@ -275,14 +257,6 @@ public abstract class ReferenceConfigBase<T> extends
AbstractReferenceConfig {
this.consumer = consumer;
}
- public String getProtocol() {
- return protocol;
- }
-
- public void setProtocol(String protocol) {
- this.protocol = protocol;
- }
-
public ServiceMetadata getServiceMetadata() {
return serviceMetadata;
}