((ClientConnectionDelegate)(_qpidConnection.getConnectionDelegate())).setHeartbeatListener(listener);
}
private ConnectionSettings retrieveConnectionSettings(BrokerDetails brokerDetail)
{
ConnectionSettings conSettings = brokerDetail.buildConnectionSettings();
conSettings.setVhost(_conn.getVirtualHost());
conSettings.setUsername(_conn.getUsername());
conSettings.setPassword(_conn.getPassword());
// Pass client name from connection URL
Map<String, Object> clientProps = new HashMap<String, Object>();
try
{
clientProps.put(ConnectionStartProperties.CLIENT_ID_0_10, _conn.getClientID());
conSettings.setClientProperties(clientProps);
}
catch (JMSException e)
{
// Ignore
}
//Check connection-level ssl override setting
String connectionSslOption = _conn.getConnectionURL().getOption(ConnectionURL.OPTIONS_SSL);
if(connectionSslOption != null)
{
boolean connUseSsl = Boolean.parseBoolean(connectionSslOption);
boolean brokerlistUseSsl = conSettings.isUseSSL();
if( connUseSsl != brokerlistUseSsl)
{
conSettings.setUseSSL(connUseSsl);
if (_logger.isDebugEnabled())
{
_logger.debug("Applied connection ssl option override, setting UseSsl to: " + connUseSsl );
}