Package org.springframework.amqp.core
Class AbstractExchange
- java.lang.Object
-
- org.springframework.amqp.core.AbstractDeclarable
-
- org.springframework.amqp.core.AbstractExchange
-
- All Implemented Interfaces:
Declarable,Exchange
- Direct Known Subclasses:
CustomExchange,DirectExchange,FanoutExchange,HeadersExchange,TopicExchange
public abstract class AbstractExchange extends AbstractDeclarable 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, Gary Russell, Artem Bilan
- See Also:
AmqpAdmin
-
-
Constructor Summary
Constructors Constructor Description AbstractExchange(String name)Construct a new durable, non-auto-delete Exchange with the provided name.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
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringgetName()The name of the exchange.abstract StringgetType()The type of the exchange.booleanisAutoDelete()True if the server should delete the exchange when it is no longer in use (if all bindings are deleted).booleanisDelayed()Is a delayed message exchange; currently requires a broker plugin.booleanisDurable()A durable exchange will survive a server restart.booleanisInternal()Is an exchange internal; i.e.voidsetDelayed(boolean delayed)Set the delayed flag.voidsetInternal(boolean internal)Set the internal flag.StringtoString()-
Methods inherited from class org.springframework.amqp.core.AbstractDeclarable
addArgument, getArguments, getDeclaringAdmins, isIgnoreDeclarationExceptions, removeArgument, setAdminsThatShouldDeclare, setIgnoreDeclarationExceptions, setShouldDeclare, shouldDeclare
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.springframework.amqp.core.Declarable
addArgument, getDeclaringAdmins, isIgnoreDeclarationExceptions, removeArgument, setAdminsThatShouldDeclare, shouldDeclare
-
Methods inherited from interface org.springframework.amqp.core.Exchange
getArguments
-
-
-
-
Constructor Detail
-
AbstractExchange
public AbstractExchange(String name)
Construct a new durable, non-auto-delete Exchange with the provided name.- 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 usearguments- the arguments used to declare the exchange
-
-
Method Detail
-
getType
public abstract String getType()
Description copied from interface:ExchangeThe type of the exchange. SeeExchangeTypesfor some well-known examples.
-
getName
public String getName()
Description copied from interface:ExchangeThe name of the exchange.
-
isDurable
public boolean isDurable()
Description copied from interface:ExchangeA durable exchange will survive a server restart.
-
isAutoDelete
public boolean isAutoDelete()
Description copied from interface:ExchangeTrue if the server should delete the exchange when it is no longer in use (if all bindings are deleted).- Specified by:
isAutoDeletein interfaceExchange- Returns:
- true if auto-delete.
-
isDelayed
public boolean isDelayed()
Description copied from interface:ExchangeIs a delayed message exchange; currently requires a broker plugin.
-
setDelayed
public void setDelayed(boolean delayed)
Set the delayed flag.- Parameters:
delayed- the delayed.- Since:
- 1.6
- See Also:
Exchange.isDelayed()
-
isInternal
public boolean isInternal()
Description copied from interface:ExchangeIs an exchange internal; i.e. can't be directly published to by a client, used for exchange-to-exchange binding only.- Specified by:
isInternalin interfaceExchange- Returns:
- true if internal.
-
setInternal
public void setInternal(boolean internal)
Set the internal flag.- Parameters:
internal- the internal.- Since:
- 1.6
- See Also:
Exchange.isInternal()
-
-