EnumSet.of(AMQState.CONNECTION_OPEN, AMQState.CONNECTION_CLOSED);
StateWaiter waiter = _conn.getProtocolHandler().createWaiter(openOrClosedStates);
ConnectionSettings settings = brokerDetail.buildConnectionSettings();
settings.setProtocol(brokerDetail.getTransport());
SSLContext sslContext = null;
if (settings.isUseSSL())
{
try
{
sslContext = SSLContextFactory.buildClientContext(
settings.getTrustStorePath(),
settings.getTrustStorePassword(),
settings.getTrustManagerFactoryAlgorithm(),
settings.getKeyStorePath(),
settings.getKeyStorePassword(),
settings.getKeyManagerFactoryAlgorithm(),
settings.getCertAlias());
}
catch (GeneralSecurityException e)
{
throw new AMQException("Unable to create SSLContext: " + e.getMessage(), e);
}