io.kroxylicious.kms.service.TestKmsFacadeFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kroxylicious-kms-test-support Show documentation
Show all versions of kroxylicious-kms-test-support Show documentation
Test support for modules testing KMS implementations.
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);
}
}