public abstract class AbstractExchange extends AbstractDeclarable implements Exchange
Subclasses of this class are typically used with administrative operations that declare an exchange.
AmqpAdmin
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
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 |
isDelayed()
Is a delayed message exchange; currently requires a broker plugin.
|
boolean |
isDurable()
A durable exchange will survive a server restart.
|
boolean |
isInternal()
Is an exchange internal; i.e.
|
void |
setDelayed(boolean delayed)
Set the delayed flag.
|
void |
setInternal(boolean internal)
Set the internal flag.
|
String |
toString() |
addArgument, getArguments, getDeclaringAdmins, isIgnoreDeclarationExceptions, removeArgument, setAdminsThatShouldDeclare, setIgnoreDeclarationExceptions, setShouldDeclare, shouldDeclare
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getArguments
addArgument, getDeclaringAdmins, isIgnoreDeclarationExceptions, removeArgument, setAdminsThatShouldDeclare, shouldDeclare
public AbstractExchange(String name)
name
- the name of the exchange.public AbstractExchange(String name, boolean durable, boolean autoDelete)
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 usepublic AbstractExchange(String name, boolean durable, boolean autoDelete, Map<String,Object> arguments)
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 exchangepublic abstract String getType()
Exchange
ExchangeTypes
for some well-known examples.public String getName()
Exchange
public boolean isDurable()
Exchange
public boolean isAutoDelete()
Exchange
isAutoDelete
in interface Exchange
public boolean isDelayed()
Exchange
public void setDelayed(boolean delayed)
delayed
- the delayed.Exchange.isDelayed()
public boolean isInternal()
Exchange
isInternal
in interface Exchange
public void setInternal(boolean internal)
internal
- the internal.Exchange.isInternal()