Spring AMQP

org.springframework.amqp.core
Class AbstractExchange

java.lang.Object
  extended by org.springframework.amqp.core.AbstractExchange
All Implemented Interfaces:
Exchange
Direct Known Subclasses:
CustomExchange, DirectExchange, FanoutExchange, HeadersExchange, TopicExchange

public abstract class AbstractExchange
extends Object
implements Exchange

Common properties that describe all exchange types.

Subclasses of this class are typically used with administrative operations that declare an exchange.

Author:
Mark Pollack
See Also:
AmqpAdmin

Constructor Summary
AbstractExchange(String name)
          Construct a new Exchange for bean usage.
AbstractExchange(String name, boolean durable, boolean autoDelete)
          Construct a new Exchange, given a name, durability flag, auto-delete flag.
AbstractExchange(String name, boolean durable, boolean autoDelete, Map<String,Object> arguments)
          Construct a new Exchange, given a name, durability flag, and auto-delete flag, and arguments.
 
Method Summary
 Map<String,Object> getArguments()
          Return the collection of arbitrary arguments to use when declaring an exchange.
 String getName()
          The name of the exchange.
abstract  String getType()
          The type of the exchange.
 boolean isAutoDelete()
          True if the server should delete the exchange when it is no longer in use (if all bindings are deleted).
 boolean isDurable()
          A durable exchange will survive a server restart
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractExchange

public AbstractExchange(String name)
Construct a new Exchange for bean usage.

Parameters:
name - the name of the exchange.

AbstractExchange

public AbstractExchange(String name,
                        boolean durable,
                        boolean autoDelete)
Construct a new Exchange, given a name, durability flag, auto-delete flag.

Parameters:
name - the name of the exchange.
durable - true if we are declaring a durable exchange (the exchange will survive a server restart)
autoDelete - true if the server should delete the exchange when it is no longer in use

AbstractExchange

public AbstractExchange(String name,
                        boolean durable,
                        boolean autoDelete,
                        Map<String,Object> arguments)
Construct a new Exchange, given a name, durability flag, and auto-delete flag, and arguments.

Parameters:
name - the name of the exchange.
durable - true if we are declaring a durable exchange (the exchange will survive a server restart)
autoDelete - true if the server should delete the exchange when it is no longer in use
arguments - the arguments used to declare the exchange
Method Detail

getType

public abstract String getType()
Description copied from interface: Exchange
The type of the exchange. See ExchangeTypes for some well-known examples.

Specified by:
getType in interface Exchange
Returns:
the type of the exchange

getName

public String getName()
Description copied from interface: Exchange
The name of the exchange.

Specified by:
getName in interface Exchange
Returns:
the name of the exchange

isDurable

public boolean isDurable()
Description copied from interface: Exchange
A durable exchange will survive a server restart

Specified by:
isDurable in interface Exchange
Returns:
true if durable

isAutoDelete

public boolean isAutoDelete()
Description copied from interface: Exchange
True if the server should delete the exchange when it is no longer in use (if all bindings are deleted).

Specified by:
isAutoDelete in interface Exchange
Returns:
true if auto-delete

getArguments

public Map<String,Object> getArguments()
Return the collection of arbitrary arguments to use when declaring an exchange.

Specified by:
getArguments in interface Exchange
Returns:
the collection of arbitrary arguments to use when declaring an exchange.

toString

public String toString()
Overrides:
toString in class Object

Spring AMQP

Copyright © 2011. All Rights Reserved.