Skip to content

Commit

Permalink
Merge branch 'PhilippeKhalife-60453' into v0.1-maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
mdspielman committed Aug 17, 2016
2 parents a8bb58b + 0245b29 commit 88d74ef
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 87 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ SolaceMessagingInfo solacemessaging = (SolaceMessagingInfo) cloud.getServiceInfo

// Setting up the JCSMP Connection
final JCSMPProperties props = new JCSMPProperties();
props.setProperty(JCSMPProperties.HOST, solacemessaging.getSmfUri());
props.setProperty(JCSMPProperties.HOST, solacemessaging.getSmfHost());
props.setProperty(JCSMPProperties.VPN_NAME, solacemessaging.getMsgVpnName());
props.setProperty(JCSMPProperties.USERNAME, solacemessaging.getClientUsername());
props.setProperty(JCSMPProperties.PASSWORD, solacemessaging.getClientPassword());
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<url>https://github.com/SolaceLabs/sl-spring-cloud-connectors.git</url>
<connection>scm:git:git://github.com/SolaceLabs/sl-spring-cloud-connectors.git</connection>
<developerConnection>scm:git:[email protected]:SolaceLabs/sl-spring-cloud-connectors.git</developerConnection>
<tag>0.1.0</tag>
<tag>HEAD</tag>
</scm>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ public SolaceMessagingInfo createServiceInfo(Map<String, Object> serviceData) {
String clientUsername = null;
String clientPassword = null;
String msgVpnName = null;
String smfUri = null;
String smfTlsUri = null;
String smfZipUri = null;
String smfHost = null;
String smfTlsHost = null;
String smfZipHost = null;
String webMessagingUri = null;
String jmsUri = null;
String jmsTlsUri = null;
String jmsJndiUri = null;
String jmsJndiTlsUri = null;
List<String> restUris = null;
List<String> restTlsUris = null;
List<String> mqttUris = null;
Expand Down Expand Up @@ -84,23 +84,23 @@ public SolaceMessagingInfo createServiceInfo(Map<String, Object> serviceData) {
case "msgVpnName":
msgVpnName = (String) value;
break;
case "smfUri":
smfUri = (String) value;
case "smfHost":
smfHost = (String) value;
break;
case "smfTlsUri":
smfTlsUri = (String) value;
case "smfTlsHost":
smfTlsHost = (String) value;
break;
case "smfZipUri":
smfZipUri = (String) value;
case "smfZipHost":
smfZipHost = (String) value;
break;
case "webMessagingUri":
webMessagingUri = (String) value;
break;
case "jmsUri":
jmsUri = (String) value;
case "jmsJndiUri":
jmsJndiUri = (String) value;
break;
case "jmsTlsUri":
jmsTlsUri = (String) value;
case "jmsJndiTlsUri":
jmsJndiTlsUri = (String) value;
break;
case "managementUsername":
managementUsername = (String) value;
Expand Down Expand Up @@ -136,7 +136,7 @@ public SolaceMessagingInfo createServiceInfo(Map<String, Object> serviceData) {
}

SolaceMessagingInfo solMessagingInfo = new SolaceMessagingInfo(id, clientUsername, clientPassword, msgVpnName,
smfUri, smfTlsUri, smfZipUri, webMessagingUri, jmsUri, jmsTlsUri, restUris, restTlsUris, mqttUris,
smfHost, smfTlsHost, smfZipHost, webMessagingUri, 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 @@ -39,12 +39,12 @@ public class SolaceMessagingInfo extends BaseServiceInfo {
private String clientUsername;
private String clientPassword;
private String msgVpnName;
private String smfUri;
private String smfTlsUri;
private String smfZipUri;
private String smfHost;
private String smfTlsHost;
private String smfZipHost;
private String webMessagingUri;
private String jmsUri;
private String jmsTlsUri;
private String jmsJndiUri;
private String jmsJndiTlsUri;
private List<String> restUris;
private List<String> restTlsUris;
private List<String> mqttUris;
Expand All @@ -62,20 +62,20 @@ public SolaceMessagingInfo() {
}

public SolaceMessagingInfo(String id, String clientUsername, String clientPassword, String msgVpnName,
String smfUri, String smfTlsUri, String smfZipUri, String webMessagingUri, String jmsUri, String jmsTlsUri,
String smfHost, String smfTlsHost, String smfZipHost, String webMessagingUri, 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) {
super(id);
this.clientUsername = clientUsername;
this.clientPassword = clientPassword;
this.msgVpnName = msgVpnName;
this.smfUri = smfUri;
this.smfTlsUri = smfTlsUri;
this.smfZipUri = smfZipUri;
this.smfHost = smfHost;
this.smfTlsHost = smfTlsHost;
this.smfZipHost = smfZipHost;
this.webMessagingUri = webMessagingUri;
this.jmsUri = jmsUri;
this.jmsTlsUri = jmsTlsUri;
this.jmsJndiUri = jmsJndiUri;
this.jmsJndiTlsUri = jmsJndiTlsUri;
this.restUris = restUris;
this.restTlsUris = restTlsUris;
this.mqttUris = mqttUris;
Expand Down Expand Up @@ -115,27 +115,27 @@ public String getMsgVpnName() {
}

/**
* @return the smfUri
* @return the smfHost
*/
@ServiceProperty
public String getSmfUri() {
return smfUri;
public String getSmfHost() {
return smfHost;
}

/**
* @return the smfTlsUri
* @return the smfTlsHost
*/
@ServiceProperty
public String getSmfTlsUri() {
return smfTlsUri;
public String getSmfTlsHost() {
return smfTlsHost;
}

/**
* @return the smfZipUri
* @return the smfZipHost
*/
@ServiceProperty
public String getSmfZipUri() {
return smfZipUri;
public String getSmfZipHost() {
return smfZipHost;
}

/**
Expand All @@ -147,19 +147,19 @@ public String getWebMessagingUri() {
}

/**
* @return the jmsUri
* @return the jmsJndiUri
*/
@ServiceProperty
public String getJmsUri() {
return jmsUri;
public String getJmsJndiUri() {
return jmsJndiUri;
}

/**
* @return the jmsTlsUri
* @return the jmsJndiTlsUri
*/
@ServiceProperty
public String getJmsTlsUri() {
return jmsTlsUri;
public String getJmsJndiTlsUri() {
return jmsJndiTlsUri;
}

/**
Expand Down Expand Up @@ -264,8 +264,8 @@ public int hashCode() {
result = prime * result + ((id == null) ? 0 : id.hashCode());
result = prime * result + ((clientPassword == null) ? 0 : clientPassword.hashCode());
result = prime * result + ((clientUsername == null) ? 0 : clientUsername.hashCode());
result = prime * result + ((jmsTlsUri == null) ? 0 : jmsTlsUri.hashCode());
result = prime * result + ((jmsUri == null) ? 0 : jmsUri.hashCode());
result = prime * result + ((jmsJndiTlsUri == null) ? 0 : jmsJndiTlsUri.hashCode());
result = prime * result + ((jmsJndiUri == null) ? 0 : jmsJndiUri.hashCode());
result = prime * result + ((managementHttpUris == null) ? 0 : managementHttpUris.hashCode());
result = prime * result + ((managementHttpsUris == null) ? 0 : managementHttpsUris.hashCode());
result = prime * result + ((managementPassword == null) ? 0 : managementPassword.hashCode());
Expand All @@ -277,9 +277,9 @@ public int hashCode() {
result = prime * result + ((msgVpnName == null) ? 0 : msgVpnName.hashCode());
result = prime * result + ((restTlsUris == null) ? 0 : restTlsUris.hashCode());
result = prime * result + ((restUris == null) ? 0 : restUris.hashCode());
result = prime * result + ((smfTlsUri == null) ? 0 : smfTlsUri.hashCode());
result = prime * result + ((smfUri == null) ? 0 : smfUri.hashCode());
result = prime * result + ((smfZipUri == null) ? 0 : smfZipUri.hashCode());
result = prime * result + ((smfTlsHost == null) ? 0 : smfTlsHost.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());
return result;
}
Expand Down Expand Up @@ -313,15 +313,15 @@ public boolean equals(Object obj) {
return false;
} else if (!clientUsername.equals(other.clientUsername))
return false;
if (jmsTlsUri == null) {
if (other.jmsTlsUri != null)
if (jmsJndiTlsUri == null) {
if (other.jmsJndiTlsUri != null)
return false;
} else if (!jmsTlsUri.equals(other.jmsTlsUri))
} else if (!jmsJndiTlsUri.equals(other.jmsJndiTlsUri))
return false;
if (jmsUri == null) {
if (other.jmsUri != null)
if (jmsJndiUri == null) {
if (other.jmsJndiUri != null)
return false;
} else if (!jmsUri.equals(other.jmsUri))
} else if (!jmsJndiUri.equals(other.jmsJndiUri))
return false;
if (managementHttpUris == null) {
if (other.managementHttpUris != null)
Expand Down Expand Up @@ -378,20 +378,20 @@ public boolean equals(Object obj) {
return false;
} else if (!restUris.equals(other.restUris))
return false;
if (smfTlsUri == null) {
if (other.smfTlsUri != null)
if (smfTlsHost == null) {
if (other.smfTlsHost != null)
return false;
} else if (!smfTlsUri.equals(other.smfTlsUri))
} else if (!smfTlsHost.equals(other.smfTlsHost))
return false;
if (smfUri == null) {
if (other.smfUri != null)
if (smfHost == null) {
if (other.smfHost != null)
return false;
} else if (!smfUri.equals(other.smfUri))
} else if (!smfHost.equals(other.smfHost))
return false;
if (smfZipUri == null) {
if (other.smfZipUri != null)
if (smfZipHost == null) {
if (other.smfZipHost != null)
return false;
} else if (!smfZipUri.equals(other.smfZipUri))
} else if (!smfZipHost.equals(other.smfZipHost))
return false;
if (webMessagingUri == null) {
if (other.webMessagingUri != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void missingKeyValueTest() {

@SuppressWarnings("unchecked")
Map<String, Object> exCred = (Map<String, Object>) exVcapServices.get("credentials");
exCred.remove("smfUri");
exCred.remove("smfHost");

SolaceMessagingInfoCreator smic = new SolaceMessagingInfoCreator();

Expand All @@ -102,8 +102,8 @@ public void missingKeyValueTest() {
SolaceMessagingInfo smi = smic.createServiceInfo(exVcapServices);

// Validate smf is null. Others are not
assertNull(smi.getSmfUri());
assertEquals("tcps://192.168.1.50:7003", smi.getSmfTlsUri());
assertNull(smi.getSmfHost());
assertEquals("tcps://192.168.1.50:7003", smi.getSmfTlsHost());

}

Expand Down Expand Up @@ -150,12 +150,12 @@ private Map<String, Object> createVcapMap() {
exCred.put("clientUsername", "sample-client-username");
exCred.put("clientPassword", "sample-client-password");
exCred.put("msgVpnName", "sample-msg-vpn");
exCred.put("smfUri", "tcp://192.168.1.50:7000");
exCred.put("smfTlsUri", "tcps://192.168.1.50:7003");
exCred.put("smfZipUri", "tcp://192.168.1.50:7001");
exCred.put("smfHost", "tcp://192.168.1.50:7000");
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("jmsUri", "smf://192.168.1.50:7000");
exCred.put("jmsTlsUri", "smfs://192.168.1.50:7003");
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"));
exCred.put("mqttTlsUris", Arrays.asList("ssl://192.168.1.50:7021"));
exCred.put("mqttWsUris", Arrays.asList("ws://192.168.1.50:7022"));
Expand Down Expand Up @@ -187,9 +187,9 @@ private void validateExampleSmi(SolaceMessagingInfo smi) {
assertEquals("sample-msg-vpn", smi.getMsgVpnName());

// Check SMF
assertEquals("tcp://192.168.1.50:7000", smi.getSmfUri());
assertEquals("tcps://192.168.1.50:7003", smi.getSmfTlsUri());
assertEquals("tcp://192.168.1.50:7001", smi.getSmfZipUri());
assertEquals("tcp://192.168.1.50:7000", smi.getSmfHost());
assertEquals("tcps://192.168.1.50:7003", smi.getSmfTlsHost());
assertEquals("tcp://192.168.1.50:7001", smi.getSmfZipHost());

// Check Web Messsaging
assertEquals("http://192.168.1.50:80", smi.getWebMessagingUri());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ public void fullSetGetCredentialsTest() throws IllegalAccessException, Invocatio
String clientUsername = "sample-client-username";
String clientPassword = "sample-client-password";
String msgVpnName = "sample-msg-vpn";
String smfUri = "tcp://192.168.1.50:7000";
String smfTlsUri = "tcps://192.168.1.50:7003";
String smfZipUri = "tcp://192.168.1.50:7001";
String smfHost = "tcp://192.168.1.50:7000";
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 jmsUri = "smf://192.168.1.50:7000";
String jmsTlsUri = "smfs://192.168.1.50:7003";
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");
List<String> mqttTlsUris = Arrays.asList("ssl://192.168.1.50:7021");
List<String> mqttWsUris = Arrays.asList("ws://192.168.1.50:7022");
Expand All @@ -57,8 +57,8 @@ public void fullSetGetCredentialsTest() throws IllegalAccessException, Invocatio
String managementUsername = "sample-mgmt-username";
String managementPassword = "sample-mgmt-password";

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

Expand All @@ -69,16 +69,16 @@ public void fullSetGetCredentialsTest() throws IllegalAccessException, Invocatio
assertEquals(msgVpnName, smi.getMsgVpnName());

// Check SMF
assertEquals(smfUri, smi.getSmfUri());
assertEquals(smfTlsUri, smi.getSmfTlsUri());
assertEquals(smfZipUri, smi.getSmfZipUri());
assertEquals(smfHost, smi.getSmfHost());
assertEquals(smfTlsHost, smi.getSmfTlsHost());
assertEquals(smfZipHost, smi.getSmfZipHost());

// Check Web Messsaging
assertEquals(webMessagingUri, smi.getWebMessagingUri());

// Check JMS
assertEquals(jmsUri, smi.getJmsUri());
assertEquals(jmsTlsUri, smi.getJmsTlsUri());
assertEquals(jmsJndiUri, smi.getJmsJndiUri());
assertEquals(jmsJndiTlsUri, smi.getJmsJndiTlsUri());

// Check MQTT
assertThat(smi.getMqttUris(), is(mqttUris));
Expand Down

0 comments on commit 88d74ef

Please sign in to comment.