Package io.grpc

Class NameResolver.ServiceConfigParser

  • Enclosing class:

    public abstract static class NameResolver.ServiceConfigParser
    extends java.lang.Object
    Parses and validates service configuration.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract NameResolver.ConfigOrError parseServiceConfig​(java.util.Map<java.lang.String,​?> rawServiceConfig)
      Parses and validates the service configuration chosen by the name resolver.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ServiceConfigParser

        public ServiceConfigParser()
    • Method Detail

      • parseServiceConfig

        public abstract NameResolver.ConfigOrError parseServiceConfig​(java.util.Map<java.lang.String,​?> rawServiceConfig)
        Parses and validates the service configuration chosen by the name resolver. This will return a NameResolver.ConfigOrError which contains either the successfully parsed config, or the Status representing the failure to parse. Implementations are expected to not throw exceptions but return a Status representing the failure. The value inside the NameResolver.ConfigOrError should implement equals() and hashCode().
        rawServiceConfig - The Map representation of the service config
        a tuple of the fully parsed and validated channel configuration, else the Status.