Class GrpcServerChannel


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

      Fields 
      Modifier and Type Field Description
      static java.lang.String NAME  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected io.grpc.ManagedChannel serverChannel​(GrpcEmbeddedServer server, java.util.concurrent.ExecutorService executorService, java.util.List<io.grpc.ClientInterceptor> clientInterceptors)
      Constructs a managed server channel.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GrpcServerChannel

        public GrpcServerChannel()
    • Method Detail

      • serverChannel

        @Singleton
        @Named("grpc-server")
        @Requires(beans=GrpcEmbeddedServer.class)
        @Bean(preDestroy="shutdown")
        protected io.grpc.ManagedChannel serverChannel​(GrpcEmbeddedServer server,
                                                       @Named("io")
                                                       java.util.concurrent.ExecutorService executorService,
                                                       java.util.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