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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected io.grpc.ManagedChannelserverChannel(GrpcEmbeddedServer server, ExecutorService executorService, List<io.grpc.ClientInterceptor> clientInterceptors) Constructs a managed in-process server channel.
-
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 serverexecutorService- The executor serviceclientInterceptors- The client interceptors- Returns:
- The channel
-