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:
ConsistentHashExchange
,CustomExchange
,DirectExchange
,FanoutExchange
,HeadersExchange
,TopicExchange
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:
-
Constructor Summary
ConstructorDescriptionAbstractExchange
(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
Modifier and TypeMethodDescriptiongetName()
The name of the exchange.abstract String
getType()
The type of the exchange.boolean
True if the server should delete the exchange when it is no longer in use (if all bindings are deleted).boolean
Is a delayed message exchange; currently requires a broker plugin.boolean
A durable exchange will survive a server restart.boolean
Is an exchange internal; i.e.void
setDelayed
(boolean delayed) Set the delayed flag.void
setInternal
(boolean internal) Set the internal flag.toString()
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 Details
-
AbstractExchange
Construct a new durable, non-auto-delete Exchange with the provided name.- Parameters:
name
- the name of the exchange.
-
AbstractExchange
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 Details
-
getType
Description copied from interface:Exchange
The type of the exchange. SeeExchangeTypes
for some well-known examples. -
getName
Description copied from interface:Exchange
The name of the exchange. -
isDurable
public boolean isDurable()Description copied from interface:Exchange
A durable exchange will survive a server restart. -
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 interfaceExchange
- Returns:
- true if auto-delete.
-
isDelayed
public boolean isDelayed()Description copied from interface:Exchange
Is 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:
-
isInternal
public boolean isInternal()Description copied from interface:Exchange
Is an exchange internal; i.e. can't be directly published to by a client, used for exchange-to-exchange binding only.- Specified by:
isInternal
in interfaceExchange
- Returns:
- true if internal.
-
setInternal
public void setInternal(boolean internal) Set the internal flag.- Parameters:
internal
- the internal.- Since:
- 1.6
- See Also:
-
toString
-