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

io.kroxylicious.kms.service.TestKmsFacadeFactory Maven / Gradle / Ivy

The newest version!
/*
 * 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.kms.service;

import java.util.ServiceLoader;
import java.util.stream.Stream;

/**
 * Factory for {@link TestKmsFacade}s.
 * @param  The config type
 * @param  The key reference
 * @param  The type of encrypted DEK
 */
public interface TestKmsFacadeFactory {

    /**
     * Creates a TestKmsFacade instance
     *
     * @return instance
     */
    TestKmsFacade build();

    /**
     * Discovers the available {@link TestKmsFacadeFactory}.
     * @return factories
     */
    @SuppressWarnings("unchecked")
    static  Stream> getTestKmsFacadeFactories() {
        return ServiceLoader.load(TestKmsFacadeFactory.class).stream()
                .map(ServiceLoader.Provider::get);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy