You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by me...@apache.org on 2020/02/06 03:19:19 UTC
[dubbo] branch master updated: publish event when exported. (#5715)
This is an automated email from the ASF dual-hosted git repository.
mercyblitz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new ee77776 publish event when exported. (#5715)
ee77776 is described below
commit ee77776296732aa7ee3c2e913210ff077ee9e0d5
Author: ken.lj <ke...@gmail.com>
AuthorDate: Thu Feb 6 11:19:02 2020 +0800
publish event when exported. (#5715)
---
.../main/java/org/apache/dubbo/config/ServiceConfigBase.java | 4 ----
.../src/main/java/org/apache/dubbo/config/ServiceConfig.java | 10 +++++++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dubbo-common/src/main/java/org/apache/dubbo/config/ServiceConfigBase.java b/dubbo-common/src/main/java/org/apache/dubbo/config/ServiceConfigBase.java
index 3d73efd..9810207 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/config/ServiceConfigBase.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/config/ServiceConfigBase.java
@@ -92,10 +92,6 @@ public abstract class ServiceConfigBase<T> extends AbstractServiceConfig {
setMethods(MethodConfig.constructMethodConfig(service.methods()));
}
- public void exported() {
-
- }
-
@Deprecated
private static List<ProtocolConfig> convertProviderToProtocol(List<ProviderConfig> providers) {
if (CollectionUtils.isEmpty(providers)) {
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
index aaeb851..83e1127 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
@@ -204,6 +204,13 @@ public class ServiceConfig<T> extends ServiceConfigBase<T> {
} else {
doExport();
}
+
+ exported();
+ }
+
+ public void exported() {
+ // dispatch a ServiceConfigExportedEvent since 2.7.4
+ dispatch(new ServiceConfigExportedEvent(this));
}
private void checkAndUpdateSubConfigs() {
@@ -290,9 +297,6 @@ public class ServiceConfig<T> extends ServiceConfigBase<T> {
path = interfaceName;
}
doExportUrls();
-
- // dispatch a ServiceConfigExportedEvent since 2.7.4
- dispatch(new ServiceConfigExportedEvent(this));
}
@SuppressWarnings({"unchecked", "rawtypes"})