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:
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

Field Summary
protected  String name
           
 
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, and auto-delete flag.
 
Method Summary
 Map<String,Object> getArguments()
          Return the collection of arbitrary arguments to use when declaring an exchange.
 String getName()
           
abstract  String getType()
           
 boolean isAutoDelete()
           
 boolean isDurable()
           
 void setArguments(Map<String,Object> arguments)
          Set the collection of arbitrary arguments to use when declaring an exchange.
 void setAutoDelete(boolean autoDelete)
          Set the auto-delete lifecycle of this exchange.
 void setDurable(boolean durable)
          Set the durability of this exchange definition.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected String name
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, and 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
Method Detail

getType

public abstract String getType()
Specified by:
getType in interface Exchange

getName

public String getName()
Specified by:
getName in interface Exchange

isDurable

public boolean isDurable()
Specified by:
isDurable in interface Exchange

setDurable

public void setDurable(boolean durable)
Set the durability of this exchange definition.

Parameters:
durable - true if describing a durable exchange (the exchange will survive a server restart)

isAutoDelete

public boolean isAutoDelete()
Specified by:
isAutoDelete in interface Exchange

setAutoDelete

public void setAutoDelete(boolean autoDelete)
Set the auto-delete lifecycle of this exchange. An non-auto-deleted exchange lasts until the server is shut down.

Parameters:
autoDelete - true if the server should delete the exchange when it is no longer in use.

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.

setArguments

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

Parameters:
arguments - A collection of arbitrary arguments to use when declaring an exchange.

toString

public String toString()
Overrides:
toString in class Object

Spring AMQP

Copyright © 2010. All Rights Reserved.