Class SimplePropertyValueConnectionNameStrategy
- java.lang.Object
-
- org.springframework.amqp.rabbit.connection.SimplePropertyValueConnectionNameStrategy
-
- All Implemented Interfaces:
ConnectionNameStrategy
,Aware
,EnvironmentAware
public class SimplePropertyValueConnectionNameStrategy extends Object implements ConnectionNameStrategy, EnvironmentAware
AConnectionNameStrategy
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
- Author:
- Gary Russell
-
-
Constructor Summary
Constructors Constructor Description SimplePropertyValueConnectionNameStrategy(String propertyName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
obtainNewConnectionName(ConnectionFactory connectionFactory)
void
setEnvironment(Environment environment)
-
-
-
Constructor Detail
-
SimplePropertyValueConnectionNameStrategy
public SimplePropertyValueConnectionNameStrategy(String propertyName)
-
-
Method Detail
-
setEnvironment
public void setEnvironment(Environment environment)
- Specified by:
setEnvironment
in interfaceEnvironmentAware
-
obtainNewConnectionName
public String obtainNewConnectionName(ConnectionFactory connectionFactory)
- Specified by:
obtainNewConnectionName
in interfaceConnectionNameStrategy
-
-