Skip to content

Commit

Permalink
Added missing webMessagingTlsUri (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeKhalife authored and mdspielman committed Nov 1, 2016
1 parent 73ad5f8 commit 60d1110
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public SolaceMessagingInfo createServiceInfo(Map<String, Object> serviceData) {
String smfTlsHost = null;
String smfZipHost = null;
String webMessagingUri = null;
String webMessagingTlsUri = null;
String jmsJndiUri = null;
String jmsJndiTlsUri = null;
List<String> restUris = null;
Expand Down Expand Up @@ -96,6 +97,9 @@ public SolaceMessagingInfo createServiceInfo(Map<String, Object> serviceData) {
case "webMessagingUri":
webMessagingUri = (String) value;
break;
case "webMessagingTlsUri":
webMessagingTlsUri = (String) value;
break;
case "jmsJndiUri":
jmsJndiUri = (String) value;
break;
Expand Down Expand Up @@ -136,7 +140,7 @@ public SolaceMessagingInfo createServiceInfo(Map<String, Object> serviceData) {
}

SolaceMessagingInfo solMessagingInfo = new SolaceMessagingInfo(id, clientUsername, clientPassword, msgVpnName,
smfHost, smfTlsHost, smfZipHost, webMessagingUri, jmsJndiUri, jmsJndiTlsUri, restUris, restTlsUris, mqttUris,
smfHost, smfTlsHost, smfZipHost, webMessagingUri, webMessagingTlsUri, jmsJndiUri, jmsJndiTlsUri, restUris, restTlsUris, mqttUris,
mqttTlsUris, mqttWsUris, mqttWssUris, managementHttpUris, managementHttpsUris, managementPassword,
managementUsername);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ public class SolaceMessagingInfo extends BaseServiceInfo {
private List<String> managementHttpsUris;
private String managementPassword;
private String managementUsername;
private String webMessagingTlsUri;

// Default constructor to enable bean unit testing.
public SolaceMessagingInfo() {
super(null);
}

public SolaceMessagingInfo(String id, String clientUsername, String clientPassword, String msgVpnName,
String smfHost, String smfTlsHost, String smfZipHost, String webMessagingUri, String jmsJndiUri, String jmsJndiTlsUri,
String smfHost, String smfTlsHost, String smfZipHost, String webMessagingUri,String webMessagingTlsUri, String jmsJndiUri, String jmsJndiTlsUri,
List<String> restUris, List<String> restTlsUris, List<String> mqttUris, List<String> mqttTlsUris,
List<String> mqttWsUris, List<String> mqttWssUris, List<String> managementHttpUris,
List<String> managementHttpsUris, String managementPassword, String managementUsername) {
Expand All @@ -74,6 +75,7 @@ public SolaceMessagingInfo(String id, String clientUsername, String clientPasswo
this.smfTlsHost = smfTlsHost;
this.smfZipHost = smfZipHost;
this.webMessagingUri = webMessagingUri;
this.webMessagingTlsUri = webMessagingTlsUri;
this.jmsJndiUri = jmsJndiUri;
this.jmsJndiTlsUri = jmsJndiTlsUri;
this.restUris = restUris;
Expand Down Expand Up @@ -145,6 +147,14 @@ public String getSmfZipHost() {
public String getWebMessagingUri() {
return webMessagingUri;
}

/**
* @return the webMessagingTlsUri
*/
@ServiceProperty
public String getWebMessagingTlsUri() {
return webMessagingTlsUri;
}

/**
* @return the jmsJndiUri
Expand Down Expand Up @@ -281,6 +291,7 @@ public int hashCode() {
result = prime * result + ((smfHost == null) ? 0 : smfHost.hashCode());
result = prime * result + ((smfZipHost == null) ? 0 : smfZipHost.hashCode());
result = prime * result + ((webMessagingUri == null) ? 0 : webMessagingUri.hashCode());
result = prime * result + ((webMessagingTlsUri == null) ? 0 : webMessagingTlsUri.hashCode());
return result;
}

Expand Down Expand Up @@ -398,6 +409,11 @@ public boolean equals(Object obj) {
return false;
} else if (!webMessagingUri.equals(other.webMessagingUri))
return false;
if (webMessagingTlsUri == null) {
if (other.webMessagingTlsUri != null)
return false;
} else if (!webMessagingTlsUri.equals(other.webMessagingTlsUri))
return false;
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ private Map<String, Object> createVcapMap() {
exCred.put("smfTlsHost", "tcps://192.168.1.50:7003");
exCred.put("smfZipHost", "tcp://192.168.1.50:7001");
exCred.put("webMessagingUri", "http://192.168.1.50:80");
exCred.put("webMessagingTlsUri", "https://192.168.1.50:80");
exCred.put("jmsJndiUri", "smf://192.168.1.50:7000");
exCred.put("jmsJndiTlsUri", "smfs://192.168.1.50:7003");
exCred.put("mqttUris", Arrays.asList("tcp://192.168.1.50:7020"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public void fullSetGetCredentialsTest() throws IllegalAccessException, Invocatio
String smfTlsHost = "tcps://192.168.1.50:7003";
String smfZipHost = "tcp://192.168.1.50:7001";
String webMessagingUri = "http://192.168.1.50:80";
String webMessagingTlsUri = "https://192.168.1.50:80";
String jmsJndiUri = "smf://192.168.1.50:7000";
String jmsJndiTlsUri = "smfs://192.168.1.50:7003";
List<String> mqttUris = Arrays.asList("tcp://192.168.1.50:7020");
Expand All @@ -58,7 +59,7 @@ public void fullSetGetCredentialsTest() throws IllegalAccessException, Invocatio
String managementPassword = "sample-mgmt-password";

SolaceMessagingInfo smi = new SolaceMessagingInfo(id, clientUsername, clientPassword, msgVpnName, smfHost,
smfTlsHost, smfZipHost, webMessagingUri, jmsJndiUri, jmsJndiTlsUri, restUris, restTlsUris, mqttUris, mqttTlsUris,
smfTlsHost, smfZipHost, webMessagingUri, webMessagingTlsUri, jmsJndiUri, jmsJndiTlsUri, restUris, restTlsUris, mqttUris, mqttTlsUris,
mqttWsUris, mqttWssUris, managementHttpUris, managementHttpsUris, managementPassword,
managementUsername);

Expand Down

0 comments on commit 60d1110

Please sign in to comment.