Package io.micronaut.grpc.server
Class GrpcServerChannel
- java.lang.Object
-
- io.micronaut.grpc.server.GrpcServerChannel
-
@Factory public class GrpcServerChannel extends java.lang.ObjectA factory that returns aManagedChannelallowing communication with the embedded server. Primarily used for testing.- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAME
-
Constructor Summary
Constructors Constructor Description GrpcServerChannel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected io.grpc.ManagedChannelserverChannel(GrpcEmbeddedServer server, java.util.concurrent.ExecutorService executorService, java.util.List<io.grpc.ClientInterceptor> clientInterceptors)Constructs a managed server channel.
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
-
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 serverexecutorService- The executor serviceclientInterceptors- The client interceptors- Returns:
- The channel
-
-