org.springframework.amqp.core
Class Address
java.lang.Object
org.springframework.amqp.core.Address
public class Address
- extends Object
Represents an address for publication of an AMQP message. The AMQP 0-8 and 0-9 specifications have an unstructured
string that is used as a "reply to" address. There are however conventions in use and this class makes it easier to
follow these conventions, which can be easily summarised as:
(exchangeType)://(exchange)/(routingKey)
Here we also allow the exchange type to default to direct, and the exchange name to default to empty (so just a
routing key will work if you know the queue name).
- Author:
- Mark Pollack, Mark Fisher, Dave Syer
- See Also:
ExchangeTypes
Constructor Summary |
Address(String address)
Create an Address instance from a structured String in the form
(exchangeType)://(exchange)/(routingKey)
where examples of valid exchangeType values can be found in the ExchangeTypes static
constants. |
Address(String exchangeType,
String exchangeName,
String routingKey)
Create an Address given the exchange type, exchange name and routing key. |
Address
public Address(String address)
- Create an Address instance from a structured String in the form
(exchangeType)://(exchange)/(routingKey)
where examples of valid exchangeType
values can be found in the ExchangeTypes
static
constants.
- Parameters:
address
- a structured string.
Address
public Address(String exchangeType,
String exchangeName,
String routingKey)
- Create an Address given the exchange type, exchange name and routing key. This will set the
- Parameters:
exchangeType
- exchangeName
- routingKey
-
getExchangeType
public String getExchangeType()
getExchangeName
public String getExchangeName()
getRoutingKey
public String getRoutingKey()
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2011. All Rights Reserved.