All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.fridujo.rabbitmq.mock.configuration.Configuration Maven / Gradle / Ivy

There is a newer version: 1.2.0
Show newest version
package com.github.fridujo.rabbitmq.mock.configuration;

import java.util.LinkedHashMap;
import java.util.Map;

import com.github.fridujo.rabbitmq.mock.exchange.MockExchangeCreator;
import com.github.fridujo.rabbitmq.mock.exchange.TypedMockExchangeCreator;

public class Configuration {
    private Map additionalExchangeCreatorsByType = new LinkedHashMap<>();

    public Configuration registerAdditionalExchangeCreator(TypedMockExchangeCreator mockExchangeCreator) {
        additionalExchangeCreatorsByType.put(mockExchangeCreator.getType(), mockExchangeCreator);
        return this;
    }

    public MockExchangeCreator getAdditionalExchangeByType(String type) {
        return additionalExchangeCreatorsByType.get(type);
    }
    
    public boolean isAdditionalExchangeRegisteredFor(String type) {
        return additionalExchangeCreatorsByType.containsKey(type);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy