
javax.money.spi.OSGiPriorityAwareServiceProvider Maven / Gradle / Ivy
The newest version!
package javax.money.spi;
import org.javamoney.moneta.spi.PriorityAwareServiceProvider;
import javax.annotation.Priority;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.ServiceLoader;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* This class replaces the {@link PriorityAwareServiceProvider} provided since the latest
* contains some bug that doesen't allow using it with OSGi, these bugs are mainly due to not specifying
* the {@link ClassLoader} when using {@link ServiceLoader#load(Class, ClassLoader)}
*
*/
public final class OSGiPriorityAwareServiceProvider implements ServiceProvider {
/**
* List of services loaded, per class.
*/
private final ConcurrentHashMap, List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy