Package org.springframework.amqp.core
Class AbstractDeclarable
java.lang.Object
org.springframework.amqp.core.AbstractDeclarable
- All Implemented Interfaces:
- Declarable
- Direct Known Subclasses:
- AbstractExchange,- Binding,- Queue
Base class for 
Declarable classes.- Since:
- 1.2
- Author:
- Gary Russell
- 
Constructor SummaryConstructorsConstructorDescriptionAbstractDeclarable(Map<String, Object> arguments) Construct an instance with the supplied arguments, or an empty map if null.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddArgument(String argName, Object argValue) Add an argument to the declarable.Collection<?>The collection ofAmqpAdmins that should declare this object; if empty, all admins should declare.booleanShould ignore exceptions (such as mismatched args) when declaring.removeArgument(String name) Remove an argument from the declarable.voidsetAdminsThatShouldDeclare(Object... adminArgs) TheAmqpAdmins that should declare this object; default is all admins.voidsetIgnoreDeclarationExceptions(boolean ignoreDeclarationExceptions) Set to true to ignore exceptions such as mismatched properties when declaring.voidsetShouldDeclare(boolean shouldDeclare) Whether or not this object should be automatically declared by anyAmqpAdmin.booleanWhether or not this object should be automatically declared by anyAmqpAdmin.
- 
Constructor Details- 
AbstractDeclarablepublic AbstractDeclarable()
- 
AbstractDeclarableConstruct an instance with the supplied arguments, or an empty map if null.- Parameters:
- arguments- the arguments.
- Since:
- 2.2.2
 
 
- 
- 
Method Details- 
shouldDeclarepublic boolean shouldDeclare()Description copied from interface:DeclarableWhether or not this object should be automatically declared by anyAmqpAdmin.- Specified by:
- shouldDeclarein interface- Declarable
- Returns:
- true if the object should be declared.
 
- 
setShouldDeclarepublic void setShouldDeclare(boolean shouldDeclare) Whether or not this object should be automatically declared by anyAmqpAdmin. Default istrue.- Parameters:
- shouldDeclare- true or false.
 
- 
getDeclaringAdminsDescription copied from interface:DeclarableThe collection ofAmqpAdmins that should declare this object; if empty, all admins should declare.- Specified by:
- getDeclaringAdminsin interface- Declarable
- Returns:
- the collection.
 
- 
isIgnoreDeclarationExceptionspublic boolean isIgnoreDeclarationExceptions()Description copied from interface:DeclarableShould ignore exceptions (such as mismatched args) when declaring.- Specified by:
- isIgnoreDeclarationExceptionsin interface- Declarable
- Returns:
- true if should ignore.
 
- 
setIgnoreDeclarationExceptionspublic void setIgnoreDeclarationExceptions(boolean ignoreDeclarationExceptions) Set to true to ignore exceptions such as mismatched properties when declaring.- Parameters:
- ignoreDeclarationExceptions- the ignoreDeclarationExceptions.
- Since:
- 1.6
 
- 
setAdminsThatShouldDeclareDescription copied from interface:DeclarableTheAmqpAdmins 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)orsetAdminsThatShouldDeclare((AmqpAdmin[]) null)). Clearing the collection resets the behavior such that all admins will declare the object.- Specified by:
- setAdminsThatShouldDeclarein interface- Declarable
- Parameters:
- adminArgs- The admins.
 
- 
addArgumentDescription copied from interface:DeclarableAdd an argument to the declarable.- Specified by:
- addArgumentin interface- Declarable
- Parameters:
- argName- the argument name.
- argValue- the argument value.
 
- 
removeArgumentDescription copied from interface:DeclarableRemove an argument from the declarable.- Specified by:
- removeArgumentin interface- Declarable
- Parameters:
- name- the argument name.
- Returns:
- the argument value or null if not present.
 
- 
getArguments
 
-