com.github.fridujo.rabbitmq.mock.configuration.Configuration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rabbitmq-mock Show documentation
Show all versions of rabbitmq-mock Show documentation
Mock for RabbitMQ Java amqp-client
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);
}
}