Package io.micronaut.grpc.channels
Class GrpcManagedChannelFactory
- java.lang.Object
-
- io.micronaut.grpc.channels.GrpcManagedChannelFactory
-
- All Implemented Interfaces:
java.lang.AutoCloseable
@Factory public class GrpcManagedChannelFactory extends java.lang.Object implements java.lang.AutoCloseableFactory bean for creatingManagedChannelinstances.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description GrpcManagedChannelFactory(io.micronaut.context.ApplicationContext beanContext)Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected io.grpc.ManagedChannelmanagedChannel(io.micronaut.inject.InjectionPoint<io.grpc.Channel> injectionPoint)Builds a managed channel for the given target.
-
-
-
Method Detail
-
managedChannel
@Bean @Primary protected io.grpc.ManagedChannel managedChannel(io.micronaut.inject.InjectionPoint<io.grpc.Channel> injectionPoint)
Builds a managed channel for the given target.- Parameters:
injectionPoint- The injection point- Returns:
- The channel
-
close
@PreDestroy public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
-