sdmxdl.web.spi.Registry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdmx-dl-api Show documentation
Show all versions of sdmx-dl-api Show documentation
Easily download official statistics - API
The newest version!
package sdmxdl.web.spi;
import internal.sdmxdl.web.spi.NoOpRegistry;
import lombok.NonNull;
import nbbrd.design.StaticFactoryMethod;
import nbbrd.design.ThreadSafe;
import nbbrd.service.Quantifier;
import nbbrd.service.ServiceDefinition;
import nbbrd.service.ServiceId;
import nbbrd.service.ServiceSorter;
import org.checkerframework.checker.nullness.qual.Nullable;
import sdmxdl.ext.Persistence;
import sdmxdl.web.WebSources;
import java.io.IOException;
import java.util.Collection;
import java.util.List;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
@ServiceDefinition(
quantifier = Quantifier.SINGLE,
fallback = NoOpRegistry.class,
loaderName = "internal.{{canonicalName}}Loader"
)
@ThreadSafe
public interface Registry {
@ServiceId(pattern = ServiceId.SCREAMING_SNAKE_CASE)
@NonNull String getRegistryId();
@ServiceSorter(reverse = true)
int getRegistryRank();
@NonNull WebSources getSources(
@NonNull List persistences,
@Nullable Consumer onEvent,
@Nullable BiConsumer onError);
@NonNull Collection getRegistryProperties();
@StaticFactoryMethod
static @NonNull Registry noOp() {
return NoOpRegistry.INSTANCE;
}
int UNKNOWN_REGISTRY_RANK = -1;
String REGISTRY_PROPERTY_PREFIX = "sdmxdl.registry";
}