You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2017/03/15 12:37:43 UTC

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

Repository: cxf
Updated Branches:
  refs/heads/master c49f7a0be -> 7fa67da19


[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/7fa67da1
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/7fa67da1
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/7fa67da1

Branch: refs/heads/master
Commit: 7fa67da1925e0a526730e6f83415a0826c72b1d4
Parents: c49f7a0
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Wed Mar 15 12:37:27 2017 +0000
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Wed Mar 15 12:37:27 2017 +0000

----------------------------------------------------------------------
 .../cxf/clustering/FailoverTargetSelector.java  | 27 +++++++++++---------
 1 file changed, 15 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/7fa67da1/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 cf8d791..de8abf1 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
@@ -432,6 +432,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
@@ -441,7 +445,7 @@ public class FailoverTargetSelector extends AbstractConduitSelector {
     protected static class InvocationKey {
         private Exchange exchange;
 
-        InvocationKey(Exchange ex) {
+        protected InvocationKey(Exchange ex) {
             exchange = ex;
         }
 
@@ -469,8 +473,7 @@ public class FailoverTargetSelector extends AbstractConduitSelector {
         private Map<String, Object> context;
         private List<Endpoint> alternateEndpoints;
         private List<String> alternateAddresses;
-
-        InvocationContext(Endpoint endpoint,
+        protected InvocationContext(Endpoint endpoint,
                           BindingOperationInfo boi,
                           Object[] prms,
                           Map<String, Object> ctx) {
@@ -481,7 +484,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,
@@ -498,35 +501,35 @@ 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);
         }
     }