{
final String resourceHost = ConfigUtils.resolveParameter (config, "", String.class, ConnectionFactory.DEFAULT_HOST); // $NON-NLS-1$
final int resourcePort = ConfigUtils.resolveParameter (config, "", Integer.class, ConnectionFactory.DEFAULT_AMQP_PORT); // $NON-NLS-1$
final String amqpServerUser = ConfigUtils.resolveParameter (config, "", String.class, ConnectionFactory.DEFAULT_USER); // $NON-NLS-1$
final String amqpServerPasswd = ConfigUtils.resolveParameter (config, "", String.class, ConnectionFactory.DEFAULT_PASS); // $NON-NLS-1$
DriverConnectionData cData;
if (amqpServerUser.equals (ConnectionFactory.DEFAULT_USER) && amqpServerPasswd.equals (ConnectionFactory.DEFAULT_PASS)) {
cData = new DriverConnectionData (resourceHost, resourcePort, "AMQP"); // $NON-NLS-1$
} else {
cData = new DriverConnectionData (resourceHost, resourcePort, "AMQP", amqpServerUser, amqpServerPasswd); // $NON-NLS-1$
}
return cData;
}