RabbitMQ:源码分析之Declarable接口

RabbitMQ:源码分析之Declarable接口


一、Declarable接口及其实现类的关系

1 . Declarable-Exchange
源码分析见:下文

    1-1 . Declarable-Exchange-AbstractExchange
    源码分析见:

        1-1-1 . Declarable-Exchange-AbstractExchange-CustomExchange
        源码分析见:
        1-1-2 . Declarable-Exchange-AbstractExchange-DirectExchange
        源码分析见:
        1-1-3 . Declarable-Exchange-AbstractExchange-FanoutExchange
        源码分析见:
        1-1-4 . Declarable-Exchange-AbstractExchange-HeadersExchange
        源码分析见:
        1-1-5 . Declarable-Exchange-AbstractExchange-TopicExchange
        源码分析见:

2 . Declarable-AbstractDeclarable
源码分析见:

    2-1 . Declarable-AbstractDeclarable-AbstractExchange
    源码分析见:

        2-1-1 . Declarable-AbstractDeclarable-AbstractExchange-CustomExchange
        源码分析见:
        2-1-2 . Declarable-AbstractDeclarable-AbstractExchange-DirectExchange
        源码分析见:
        2-1-3 . Declarable-AbstractDeclarable-AbstractExchange-FanoutExchange
        源码分析见:
        2-1-4 . Declarable-AbstractDeclarable-AbstractExchange-HeadersExchange
        源码分析见:
        2-1-5 . Declarable-AbstractDeclarable-AbstractExchange-TopicExchange
        源码分析见:

    2-2 . Declarable-AbstractDeclarable-Binding
    源码分析见:

    2-3 . Declarable-AbstractDeclarable-Queue
    源码分析见:https://blog.csdn.net/qq_29229567/article/details/86524915

        2-3-1 . Declarable-AbstractDeclarable-AnonymousQueue
        源码分析见:
        2-3-2 . Declarable-AbstractDeclarable-UniquelyNamedQueue
        源码分析见:
在这里插入图片描述

二、Declarable接口的源码如下:

package org.springframework.amqp.core;

import java.util.Collection;

public interface Declarable {
	boolean shouldDeclare();

	Collection<?> getDeclaringAdmins();

	boolean isIgnoreDeclarationExceptions();
}

三、Declarable接口的分析如下:

Declarable接口中共计3个抽象接口
1 . 接口1:是否应自动声明此对象。如果应声明对象,则为true。

boolean shouldDeclare();

2 . 接口2:对象如果为空,则所有管理员都应声明集合。

Collection<?> getDeclaringAdmins();

3 . 接口3:声明时是否应忽略异常(例如不匹配的参数)。如果要忽略,则为true。

boolean isIgnoreDeclarationExceptions();
©️2020 CSDN 皮肤主题: Age of Ai 设计师:meimeiellie 返回首页