Class GrpcManagedChannelFactory

java.lang.Object
io.micronaut.grpc.channels.GrpcManagedChannelFactory
All Implemented Interfaces:
AutoCloseable

@Factory public class GrpcManagedChannelFactory extends Object implements AutoCloseable
Factory bean for creating ManagedChannel instances.
Since:
1.0
Author:
graemerocher
  • Constructor Details

    • GrpcManagedChannelFactory

      public GrpcManagedChannelFactory(io.micronaut.context.ApplicationContext beanContext)
      Default constructor.
      Parameters:
      beanContext - The bean context
  • Method Details

    • 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:
      close in interface AutoCloseable