public class Queue extends AbstractDeclarable implements java.lang.Cloneable
AmqpAdmin| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
X_QUEUE_LEADER_LOCATOR
Argument key for the queue leader locator.
|
static java.lang.String |
X_QUEUE_MASTER_LOCATOR
Deprecated.
in favor of
X_QUEUE_LEADER_LOCATOR. |
| Constructor and Description |
|---|
Queue(java.lang.String name)
The queue is durable, non-exclusive and non auto-delete.
|
Queue(java.lang.String name,
boolean durable)
Construct a new queue, given a name and durability flag.
|
Queue(java.lang.String name,
boolean durable,
boolean exclusive,
boolean autoDelete)
Construct a new queue, given a name, durability, exclusive and auto-delete flags.
|
Queue(java.lang.String name,
boolean durable,
boolean exclusive,
boolean autoDelete,
java.util.Map<java.lang.String,java.lang.Object> arguments)
Construct a new queue, given a name, durability flag, and auto-delete flag, and arguments.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
java.lang.String |
getActualName()
Return the name provided to the constructor or the broker-generated name
if that name is an empty String.
|
java.lang.String |
getName()
Return the name provided in the constructor.
|
boolean |
isAutoDelete()
True if the server should delete the queue when it is no longer in use (the last consumer is cancelled).
|
boolean |
isDurable()
A durable queue will survive a server restart.
|
boolean |
isExclusive()
True if the server should only send messages to the declarer's connection.
|
void |
setActualName(java.lang.String name)
Set the name from the DeclareOk.
|
void |
setLeaderLocator(java.lang.String locator)
Set the leader locator strategy argument for this queue.
|
void |
setMasterLocator(java.lang.String locator)
Deprecated.
in favor of
setLeaderLocator(String). |
java.lang.String |
toString() |
addArgument, getArguments, getDeclaringAdmins, isIgnoreDeclarationExceptions, removeArgument, setAdminsThatShouldDeclare, setIgnoreDeclarationExceptions, setShouldDeclare, shouldDeclare@Deprecated public static final java.lang.String X_QUEUE_MASTER_LOCATOR
X_QUEUE_LEADER_LOCATOR.public static final java.lang.String X_QUEUE_LEADER_LOCATOR
public Queue(java.lang.String name)
name - the name of the queue.public Queue(java.lang.String name,
boolean durable)
name - the name of the queue.durable - true if we are declaring a durable queue (the queue will survive a server restart)public Queue(java.lang.String name,
boolean durable,
boolean exclusive,
boolean autoDelete)
name - the name of the queue.durable - true if we are declaring a durable queue (the queue will survive a server restart)exclusive - true if we are declaring an exclusive queue (the queue will only be used by the declarer's
connection)autoDelete - true if the server should delete the queue when it is no longer in usepublic Queue(java.lang.String name,
boolean durable,
boolean exclusive,
boolean autoDelete,
@Nullable
java.util.Map<java.lang.String,java.lang.Object> arguments)
name - the name of the queue - must not be null; set to "" to have the broker generate the name.durable - true if we are declaring a durable queue (the queue will survive a server restart)exclusive - true if we are declaring an exclusive queue (the queue will only be used by the declarer's
connection)autoDelete - true if the server should delete the queue when it is no longer in usearguments - the arguments used to declare the queuepublic java.lang.String getName()
getActualName()public boolean isDurable()
public boolean isExclusive()
public boolean isAutoDelete()
public void setActualName(java.lang.String name)
name - the name.public java.lang.String getActualName()
@Deprecated
public final void setMasterLocator(@Nullable
java.lang.String locator)
setLeaderLocator(String).locator - the locator; null to clear the argument.public final void setLeaderLocator(@Nullable
java.lang.String locator)
locator - the locator; null to clear the argument.public java.lang.Object clone()
clone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object