List of usage examples for org.springframework.amqp.rabbit.connection RabbitConnectionFactoryBean setTrustStore
public void setTrustStore(String trustStore)
From source file:org.springframework.amqp.rabbit.connection.LocalizedQueueConnectionFactory.java
/** * Create a dedicated connection factory for the address. * @param address the address to which the factory should connect. * @param node the node.//from www . java 2 s. co m * @return the connection factory. * @throws Exception if errors occur during creation. */ protected ConnectionFactory createConnectionFactory(String address, String node) throws Exception { RabbitConnectionFactoryBean rcfb = new RabbitConnectionFactoryBean(); rcfb.setUseSSL(this.useSSL); rcfb.setSslPropertiesLocation(this.sslPropertiesLocation); rcfb.setKeyStore(this.keyStore); rcfb.setTrustStore(this.trustStore); rcfb.setKeyStorePassphrase(this.keyStorePassPhrase); rcfb.setTrustStorePassphrase(this.trustStorePassPhrase); rcfb.afterPropertiesSet(); CachingConnectionFactory ccf = new CachingConnectionFactory(rcfb.getObject()); ccf.setAddresses(address); ccf.setUsername(this.username); ccf.setPassword(this.password); ccf.setVirtualHost(this.vhost); ccf.setBeanName("node:" + node); return ccf; }