Class InProcessGrpcServerChannel

java.lang.Object
io.micronaut.grpc.server.InProcessGrpcServerChannel

@Factory @Requires(property="grpc.server.in-process-name") @Internal public class InProcessGrpcServerChannel extends Object
Provides an in-process managed channel for the embedded gRPC server.
Since:
5.0.0
  • Constructor Details

    • InProcessGrpcServerChannel

      public InProcessGrpcServerChannel()
  • Method Details

    • serverChannel

      @Singleton @Named("grpc-server") @Requires(beans=GrpcEmbeddedServer.class) @Bean(preDestroy="shutdown") @Replaces(value=io.grpc.ManagedChannel.class, factory=GrpcServerChannel.class, named="grpc-server") protected io.grpc.ManagedChannel serverChannel(GrpcEmbeddedServer server, @Named("io") ExecutorService executorService, List<io.grpc.ClientInterceptor> clientInterceptors)
      Constructs a managed in-process server channel.
      Parameters:
      server - The embedded gRPC server
      executorService - The executor service
      clientInterceptors - The client interceptors
      Returns:
      The channel