Package io.grpc

Class ServerRegistry

    • Constructor Detail

      • ServerRegistry

        public ServerRegistry()
    • Method Detail

      • register

        public void register​(ServerProvider provider)
        Register a provider.

        If the provider's isAvailable() returns false, this method will throw IllegalArgumentException.

        Providers will be used in priority order. In case of ties, providers are used in registration order.

      • deregister

        public void deregister​(ServerProvider provider)
        Deregisters a provider. No-op if the provider is not in the registry.
        provider - the provider that was added to the register via register(io.grpc.ServerProvider).
      • getDefaultRegistry

        public static ServerRegistry getDefaultRegistry()
        Returns the default registry that loads providers via the Java service loader mechanism.