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

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

There is a newer version: 3.15.1
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy