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

io.kroxylicious.proxy.config.ClusterNetworkAddressConfigProviderDefinitionBuilder Maven / Gradle / Ivy

/*
 * Copyright Kroxylicious Authors.
 *
 * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
 */

package io.kroxylicious.proxy.config;

import java.util.Map;

import io.kroxylicious.proxy.clusternetworkaddressconfigprovider.ClusterNetworkAddressConfigProviderContributor;
import io.kroxylicious.proxy.service.ContributionManager;

public class ClusterNetworkAddressConfigProviderDefinitionBuilder extends AbstractDefinitionBuilder {
    public ClusterNetworkAddressConfigProviderDefinitionBuilder(String type) {
        super(type);
    }

    @Override
    protected ClusterNetworkAddressConfigProviderDefinition buildInternal(String type, Map config) {
        Class result = ContributionManager.INSTANCE.getDefinition(ClusterNetworkAddressConfigProviderContributor.class, type).configurationType();

        return new ClusterNetworkAddressConfigProviderDefinition(type, mapper.convertValue(config, result));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy