Class GrpcServerChannel

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

@Factory public class GrpcServerChannel extends Object
A factory that returns a ManagedChannel allowing communication with the embedded server. Primarily used for testing.
Since:
1.0
Author:
graemerocher
  • Field Details

  • Constructor Details

    • GrpcServerChannel

      public GrpcServerChannel()
  • Method Details

    • serverChannel

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