Interface Declarable

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default void addArgument​(java.lang.String name, java.lang.Object value)
      Add an argument to the declarable.
      java.util.Collection<?> getDeclaringAdmins()
      The collection of AmqpAdmins that should declare this object; if empty, all admins should declare.
      boolean isIgnoreDeclarationExceptions()
      Should ignore exceptions (such as mismatched args) when declaring.
      default java.lang.Object removeArgument​(java.lang.String name)
      Remove an argument from the declarable.
      void setAdminsThatShouldDeclare​(java.lang.Object... adminArgs)
      The AmqpAdmins that should declare this object; default is all admins.
      boolean shouldDeclare()
      Whether or not this object should be automatically declared by any AmqpAdmin.
    • Method Detail

      • shouldDeclare

        boolean shouldDeclare()
        Whether or not this object should be automatically declared by any AmqpAdmin.
        Returns:
        true if the object should be declared.
      • getDeclaringAdmins

        java.util.Collection<?> getDeclaringAdmins()
        The collection of AmqpAdmins that should declare this object; if empty, all admins should declare.
        Returns:
        the collection.
      • isIgnoreDeclarationExceptions

        boolean isIgnoreDeclarationExceptions()
        Should ignore exceptions (such as mismatched args) when declaring.
        Returns:
        true if should ignore.
        Since:
        1.6
      • setAdminsThatShouldDeclare

        void setAdminsThatShouldDeclare​(java.lang.Object... adminArgs)
        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:
        adminArgs - The admins.
      • addArgument

        default void addArgument​(java.lang.String name,
                                 java.lang.Object value)
        Add an argument to the declarable.
        Parameters:
        name - the argument name.
        value - the argument value.
        Since:
        2.2.2
      • removeArgument

        @Nullable
        default java.lang.Object removeArgument​(java.lang.String name)
        Remove an argument from the declarable.
        Parameters:
        name - the argument name.
        Returns:
        the argument value or null if not present.
        Since:
        2.2.2