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

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

Introduction

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

Prototype

public void setSslAlgorithm(String sslAlgorithm) 

Source Link

Document

Set the algorithm to use; default TLSv1.1.

Usage

From source file:org.springframework.amqp.rabbit.connection.SSLConnectionTests.java

@Test
public void testAlgNoProps() throws Exception {
    RabbitConnectionFactoryBean fb = new RabbitConnectionFactoryBean();
    ConnectionFactory rabbitCf = spy(/*from  w w  w. jav  a2  s .c  om*/
            TestUtils.getPropertyValue(fb, "connectionFactory", ConnectionFactory.class));
    new DirectFieldAccessor(fb).setPropertyValue("connectionFactory", rabbitCf);
    fb.setUseSSL(true);
    fb.setSslAlgorithm("TLSv1.2");
    fb.afterPropertiesSet();
    fb.getObject();
    verify(rabbitCf).useSslProtocol("TLSv1.2");
}