* @param txtHost must have Name, AddOnConnectionInfo, SSLPolicy, and SSLCertificate fields set
* @return
*/
public HostAgent getHostAgent(TblHosts host) {
try {
InternetAddress hostAddress = new InternetAddress(host.getName()); // switching from Hostname to InternetAddress (better support for both hostname and ip address)
// here we figure out if it's vmware or intel and ensure we have a valid connection string starting with the vendor scheme. XXX TODO should not be here, everyone should have valid connection strings like vmware:*, intel:*, citrix:*, etc.
// no special case for citrix, since that support was added recently they should always come with citrix: prepended.
String connectionString = getConnectionString(host);
TlsPolicy tlsPolicy = getTlsPolicy(host);
return getHostAgent(hostAddress, connectionString, tlsPolicy); // XXX TODO need to have a way for the agent using trust-first-certificate to save a new certificate to the TblHosts record... right now it is lost.