Open up InvocationContext for subclasses of FailoverTargetSelector, patch from Hugo Trippaers applied, This closes
@@ -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);
}
}
