Spring AMQP

org.springframework.amqp.core
Class Address

java.lang.Object
  extended by org.springframework.amqp.core.Address

public class Address
extends java.lang.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(java.lang.String address)
          Create an Address instance from a structured String in the form
Address(java.lang.String exchangeType, java.lang.String exchangeName, java.lang.String routingKey)
          Create an Address given the exchange type, exchange name and routing key.
 
Method Summary
 java.lang.String getExchangeName()
           
 java.lang.String getExchangeType()
           
 java.lang.String getRoutingKey()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Address

public Address(java.lang.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(java.lang.String exchangeType,
               java.lang.String exchangeName,
               java.lang.String routingKey)
Create an Address given the exchange type, exchange name and routing key. This will set the exchange type, name and the routing key explicitly.

Parameters:
exchangeType -
exchangeName -
routingKey -
Method Detail

getExchangeType

public java.lang.String getExchangeType()

getExchangeName

public java.lang.String getExchangeName()

getRoutingKey

public java.lang.String getRoutingKey()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Spring AMQP