Example usage for org.springframework.amqp.rabbit.connection RabbitConnectionFactoryBean setTrustStorePassphrase

List of usage examples for org.springframework.amqp.rabbit.connection RabbitConnectionFactoryBean setTrustStorePassphrase

Introduction

In this page you can find the example usage for org.springframework.amqp.rabbit.connection RabbitConnectionFactoryBean setTrustStorePassphrase.

Prototype

public void setTrustStorePassphrase(String trustStorePassphrase) 

Source Link

Document

Set the trust store pass phrase - overrides the property in #setSslPropertiesLocation(Resource) .

Usage

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./* ww w.  ja va  2 s.  c om*/
 * @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;
}