You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2019/12/23 04:46:54 UTC

[dubbo] branch 2.7.5-release updated: Rename onReponse in ClusterInterceptor to onMessage (#5528)

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

liujun pushed a commit to branch 2.7.5-release
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/2.7.5-release by this push:
     new c9d1c1a  Rename onReponse in ClusterInterceptor to onMessage (#5528)
c9d1c1a is described below

commit c9d1c1a5d4fd86236301f1c4215792ca451837d5
Author: ken.lj <ke...@gmail.com>
AuthorDate: Mon Dec 23 12:46:44 2019 +0800

    Rename onReponse in ClusterInterceptor to onMessage (#5528)
---
 .../org/apache/dubbo/rpc/cluster/interceptor/ClusterInterceptor.java    | 2 +-
 .../rpc/cluster/interceptor/ConsumerContextClusterInterceptor.java      | 2 +-
 .../org/apache/dubbo/rpc/cluster/support/wrapper/AbstractCluster.java   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/interceptor/ClusterInterceptor.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/interceptor/ClusterInterceptor.java
index 5bf100b..e989699 100644
--- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/interceptor/ClusterInterceptor.java
+++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/interceptor/ClusterInterceptor.java
@@ -49,7 +49,7 @@ public interface ClusterInterceptor {
 
     interface Listener {
 
-        void onResponse(Result appResponse, AbstractClusterInvoker<?> clusterInvoker, Invocation invocation);
+        void onMessage(Result appResponse, AbstractClusterInvoker<?> clusterInvoker, Invocation invocation);
 
         void onError(Throwable t, AbstractClusterInvoker<?> clusterInvoker, Invocation invocation);
     }
diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/interceptor/ConsumerContextClusterInterceptor.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/interceptor/ConsumerContextClusterInterceptor.java
index f53f33c..1216ed6 100644
--- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/interceptor/ConsumerContextClusterInterceptor.java
+++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/interceptor/ConsumerContextClusterInterceptor.java
@@ -44,7 +44,7 @@ public class ConsumerContextClusterInterceptor implements ClusterInterceptor, Cl
     }
 
     @Override
-    public void onResponse(Result appResponse, AbstractClusterInvoker<?> invoker, Invocation invocation) {
+    public void onMessage(Result appResponse, AbstractClusterInvoker<?> invoker, Invocation invocation) {
         RpcContext.getServerContext().setAttachments(appResponse.getAttachments());
     }
 
diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/wrapper/AbstractCluster.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/wrapper/AbstractCluster.java
index bb8297f..0170026 100644
--- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/wrapper/AbstractCluster.java
+++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/wrapper/AbstractCluster.java
@@ -105,7 +105,7 @@ public abstract class AbstractCluster implements Cluster {
                 if (interceptor instanceof ClusterInterceptor.Listener) {
                     ClusterInterceptor.Listener listener = (ClusterInterceptor.Listener) interceptor;
                     if (t == null) {
-                        listener.onResponse(r, clusterInvoker, invocation);
+                        listener.onMessage(r, clusterInvoker, invocation);
                     } else {
                         listener.onError(t, clusterInvoker, invocation);
                     }