Class SimplePropertyValueConnectionNameStrategy

java.lang.Object
org.springframework.amqp.rabbit.connection.SimplePropertyValueConnectionNameStrategy
All Implemented Interfaces:
ConnectionNameStrategy, org.springframework.beans.factory.Aware, org.springframework.context.EnvironmentAware

public class SimplePropertyValueConnectionNameStrategy extends Object implements ConnectionNameStrategy, org.springframework.context.EnvironmentAware
A ConnectionNameStrategy that returns the value of a (required) property. If the property does not exist, the connection will be given the name of the property.
Since:
2.1
  • Constructor Details

    • SimplePropertyValueConnectionNameStrategy

      public SimplePropertyValueConnectionNameStrategy(String propertyName)
  • Method Details

    • setEnvironment

      public void setEnvironment(org.springframework.core.env.Environment environment)
      Specified by:
      setEnvironment in interface org.springframework.context.EnvironmentAware
    • obtainNewConnectionName

      public String obtainNewConnectionName(ConnectionFactory connectionFactory)
      Specified by:
      obtainNewConnectionName in interface ConnectionNameStrategy