cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-7285] Open up InvocationContext for subclasses of FailoverTargetSelector, patch from Hugo Trippaers applied, This closes #245
Date Wed, 15 Mar 2017 12:54:09 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 95392b3b6 -> eab4d83fb


[CXF-7285] Open up InvocationContext for subclasses of FailoverTargetSelector, patch from
Hugo Trippaers applied, This closes #245


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/eab4d83f
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/eab4d83f
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/eab4d83f

Branch: refs/heads/3.1.x-fixes
Commit: eab4d83fbc405623281508d4b26baf9aa5fd0917
Parents: 95392b3
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed Mar 15 12:37:27 2017 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Wed Mar 15 12:53:46 2017 +0000

----------------------------------------------------------------------
 .../cxf/clustering/FailoverTargetSelector.java  | 38 +++++++++++---------
 1 file changed, 21 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/eab4d83f/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java
----------------------------------------------------------------------
diff --git a/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java
b/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java
index 44e1795..5379416 100644
--- a/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java
+++ b/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java
@@ -416,6 +416,10 @@ public class FailoverTargetSelector extends AbstractConduitSelector {
         this.clientBootstrapAddress = clientBootstrapAddress;
     }
 
+    protected InvocationKey getInvocationKey(Exchange e) {
+        return new InvocationKey(e);
+    }
+
     /**
      * Used to wrap an Exchange for usage as a Map key. The raw Exchange
      * is not a suitable key type, as the hashCode is computed from its
@@ -424,9 +428,9 @@ public class FailoverTargetSelector extends AbstractConduitSelector {
      */
     protected static class InvocationKey {
         private Exchange exchange;
-        
-        InvocationKey(Exchange ex) {
-            exchange = ex;     
+
+        protected InvocationKey(Exchange ex) {
+            exchange = ex;
         }
         
         @Override
@@ -453,7 +457,7 @@ public class FailoverTargetSelector extends AbstractConduitSelector {
         private Map<String, Object> context;
         private List<Endpoint> alternateEndpoints;
         private List<String> alternateAddresses;
-        
+
         InvocationContext(Endpoint endpoint,
                           BindingOperationInfo boi,
                           Object[] prms, 
@@ -465,7 +469,7 @@ public class FailoverTargetSelector extends AbstractConduitSelector {
             context = ctx;
         }
 
-        Endpoint retrieveOriginalEndpoint(Endpoint endpoint) {
+        public Endpoint retrieveOriginalEndpoint(Endpoint endpoint) {
             if (endpoint != null) {
                 if (endpoint != originalEndpoint) {
                     getLogger().log(Level.INFO,
@@ -481,36 +485,36 @@ public class FailoverTargetSelector extends AbstractConduitSelector
{
             }
             return originalEndpoint;
         }
-        
-        BindingOperationInfo getBindingOperationInfo() {
+
+        public BindingOperationInfo getBindingOperationInfo() {
             return bindingOperationInfo;
         }
-        
-        Object[] getParams() {
+
+        public Object[] getParams() {
             return params;
         }
-        
-        Map<String, Object> getContext() {
+
+        public Map<String, Object> getContext() {
             return context;
         }
-        
-        List<Endpoint> getAlternateEndpoints() {
+
+        public List<Endpoint> getAlternateEndpoints() {
             return alternateEndpoints;
         }
 
-        List<String> getAlternateAddresses() {
+        public List<String> getAlternateAddresses() {
             return alternateAddresses;
         }
 
-        void setAlternateEndpoints(List<Endpoint> alternates) {
+        protected void setAlternateEndpoints(List<Endpoint> alternates) {
             alternateEndpoints = alternates;
         }
 
-        void setAlternateAddresses(List<String> alternates) {
+        protected void setAlternateAddresses(List<String> alternates) {
             alternateAddresses = alternates;
         }
 
-        boolean hasAlternates() {
+        public boolean hasAlternates() {
             return !(alternateEndpoints == null && alternateAddresses == null);
         }
     }    


Mime
View raw message