Spring AMQP

org.springframework.amqp.core
Class AbstractDeclarable

java.lang.Object
  extended by org.springframework.amqp.core.AbstractDeclarable
All Implemented Interfaces:
Declarable
Direct Known Subclasses:
AbstractExchange, Binding, Queue

public abstract class AbstractDeclarable
extends Object
implements Declarable

Base class for Declarable classes.

Since:
1.2
Author:
Gary Russell

Constructor Summary
AbstractDeclarable()
           
 
Method Summary
 Collection<AmqpAdmin> getDeclaringAdmins()
          The collection of AmqpAdmins that should declare this object; if empty, all admins should declare.
 void setAdminsThatShouldDeclare(AmqpAdmin... admins)
          The AmqpAdmins that should declare this object; default is all admins.
 void setShouldDeclare(boolean shouldDeclare)
          Whether or not this object should be automatically declared by any AmqpAdmin.
 boolean shouldDeclare()
          Whether or not this object should be automatically declared by any AmqpAdmin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDeclarable

public AbstractDeclarable()
Method Detail

shouldDeclare

public boolean shouldDeclare()
Description copied from interface: Declarable
Whether or not this object should be automatically declared by any AmqpAdmin.

Specified by:
shouldDeclare in interface Declarable
Returns:
true if the object should be declared.

setShouldDeclare

public void setShouldDeclare(boolean shouldDeclare)
Whether or not this object should be automatically declared by any AmqpAdmin. Default is true.

Parameters:
shouldDeclare - true or false.

getDeclaringAdmins

public Collection<AmqpAdmin> getDeclaringAdmins()
Description copied from interface: Declarable
The collection of AmqpAdmins that should declare this object; if empty, all admins should declare.

Specified by:
getDeclaringAdmins in interface Declarable
Returns:
the collection.

setAdminsThatShouldDeclare

public void setAdminsThatShouldDeclare(AmqpAdmin... admins)
The AmqpAdmins that should declare this object; default is all admins.

A null argument, or an array/varArg with a single null argument, clears the collection (setAdminsThatShouldDeclare((AmqpAdmin) null) or setAdminsThatShouldDeclare((AmqpAdmin[]) null)). Clearing the collection resets the behavior such that all admins will declare the object.

Parameters:
admins - The admins.

Spring AMQP