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

io.quarkus.grpc.runtime.ServerInterceptorStorage Maven / Gradle / Ivy

There is a newer version: 3.15.1
Show newest version
package io.quarkus.grpc.runtime;

import java.util.Collections;
import java.util.Map;
import java.util.Set;

public final class ServerInterceptorStorage {

    private final Map>> perServiceInterceptors;
    private final Set> globalInterceptors;

    public ServerInterceptorStorage(Map>> perServiceInterceptors,
            Set> globalInterceptors) {
        this.perServiceInterceptors = Map.copyOf(perServiceInterceptors);
        this.globalInterceptors = Set.copyOf(globalInterceptors);
    }

    public Set> getInterceptors(String serviceClassName) {
        return perServiceInterceptors.getOrDefault(serviceClassName, Collections.emptySet());
    }

    public Set> getGlobalInterceptors() {
        return globalInterceptors;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy