This is an automated email from the ASF dual-hosted git repository.
kylixs pushed a commit to branch 3.0-multi-instances
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.0-multi-instances by this
push:
new 85f9291 polish doc of scope model
85f9291 is described below
commit 85f9291cd494187966b1b4b4f0bd05a2a6da5d44
Author: gongdewei <[email protected]>
AuthorDate: Thu Aug 26 22:09:05 2021 +0800
polish doc of scope model
---
.../org/apache/dubbo/rpc/model/ScopeModelAccessor.java | 2 +-
.../org/apache/dubbo/rpc/model/ScopeModelAware.java | 18 +++++++++++++++++-
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git
a/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ScopeModelAccessor.java
b/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ScopeModelAccessor.java
index 35aefa7..9e9291e 100644
---
a/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ScopeModelAccessor.java
+++
b/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ScopeModelAccessor.java
@@ -17,7 +17,7 @@
package org.apache.dubbo.rpc.model;
/**
- * An accessor for scope module, it can be use in interface default methods to
get scope model.
+ * An accessor for scope model, it can be use in interface default methods to
get scope model.
*/
public interface ScopeModelAccessor {
diff --git
a/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ScopeModelAware.java
b/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ScopeModelAware.java
index 1fdc422..6b60567 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ScopeModelAware.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ScopeModelAware.java
@@ -17,19 +17,35 @@
package org.apache.dubbo.rpc.model;
/**
- * Interface to inject FrameworkModel/ApplicationModel/ModuleModel for SPI
extension.
+ * An interface to inject FrameworkModel/ApplicationModel/ModuleModel for SPI
extensions and internal beans.
*/
public interface ScopeModelAware {
+ /**
+ * Override this method if you need get the scope model (maybe one of
FrameworkModel/ApplicationModel/ModuleModel).
+ * @param scopeModel
+ */
default void setScopeModel(ScopeModel scopeModel) {
}
+ /**
+ * Override this method if you just need framework model
+ * @param frameworkModel
+ */
default void setFrameworkModel(FrameworkModel frameworkModel) {
}
+ /**
+ * Override this method if you just need application model
+ * @param applicationModel
+ */
default void setApplicationModel(ApplicationModel applicationModel) {
}
+ /**
+ * Override this method if you just need module model
+ * @param moduleModel
+ */
default void setModuleModel(ModuleModel moduleModel) {
}