io.quarkus.grpc.runtime.GrpcContainer 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.List;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject.Instance;
import jakarta.inject.Inject;
import io.grpc.BindableService;
import io.grpc.ServerInterceptor;
import io.quarkus.grpc.GrpcService;
@ApplicationScoped
public class GrpcContainer {
@Inject
@GrpcService
Instance services;
@Inject
ServerInterceptorStorage interceptorStorage;
List getSortedPerServiceInterceptors(String serviceClassName) {
return Interceptors.getSortedPerServiceInterceptors(serviceClassName,
interceptorStorage.getInterceptors(serviceClassName));
}
List getSortedGlobalInterceptors() {
return Interceptors.getSortedGlobalInterceptors(interceptorStorage.getGlobalInterceptors());
}
public Instance getServices() {
return services;
}
}