Class ChannelProviders


  • @Deprecated(since="22.06.2")
    public class ChannelProviders
    extends Object
    Deprecated.
    A provider of gRPC channels.

    Named Channel instances are provided by instances of ChannelProvider discovered by the ServiceLoader or manually added to this provider.

    When providing a Channel the registered or discovered providers will be tried in priority order.

    The providers are lazilly loaded the first time a channel is required.

    Since:
    20.12
    Author:
    Jonathan Knight 2020.12.17
    • Constructor Detail

      • ChannelProviders

        protected ChannelProviders()
        Deprecated.
        Protected constructor as this is a typically a singleton accessed via INSTANCE.
    • Method Detail

      • findChannel

        public Optional<io.grpc.Channel> findChannel​(String sName)
        Deprecated.
        Find a Channel from one of the channel providers.
        Parameters:
        sName - the name of the channel
        Returns:
        the Channel instance or an empty Optional if no provider exists with the specified name