io.quarkus.grpc.runtime.ServerInterceptorStorage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-grpc Show documentation
Show all versions of quarkus-grpc Show documentation
Serve and consume gRPC services
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;
}
}