connection = Proton.connection();
connection.setContainer(_name);
connection.setHostname(host);
connection.setContext(new ConnectionContext(address, connector));
connector.setConnection(connection);
Sasl sasl = connector.sasl();
if (sasl != null)
{
sasl.client();
sasl.setMechanisms(new String[]{"ANONYMOUS"});
}
if ("amqps".equalsIgnoreCase(address.getScheme())) {
Transport transport = connector.getTransport();
SslDomain domain = makeDomain(address, SslDomain.Mode.CLIENT);
if (_trustedDb != null) {