Package io.grpc

Class NameResolver.Factory

    • Field Detail

      • PARAMS_DEFAULT_PORT

        @Deprecated
        public static final Attributes.Key<java.lang.Integer> PARAMS_DEFAULT_PORT
        Deprecated.
        this will be deleted along with newNameResolver(URI, Attributes) in a future release.
        The port number used in case the target or the underlying naming system doesn't provide a port number.
        Since:
        1.0.0
    • Constructor Detail

      • Factory

        public Factory()
    • Method Detail

      • newNameResolver

        @Nullable
        @Deprecated
        public NameResolver newNameResolver​(java.net.URI targetUri,
                                            Attributes params)
        Deprecated.
        Implement newNameResolver(URI, NameResolver.Helper) instead. This is going to be deleted in a future release.
        Creates a NameResolver for the given target URI, or null if the given URI cannot be resolved by this factory. The decision should be solely based on the scheme of the URI.
        Parameters:
        targetUri - the target URI to be resolved, whose scheme must not be null
        params - optional parameters. Canonical keys are defined as PARAMS_* fields in NameResolver.Factory.
        Since:
        1.0.0
      • newNameResolver

        @Deprecated
        @Nullable
        public NameResolver newNameResolver​(java.net.URI targetUri,
                                            NameResolver.Helper helper)
        Deprecated.
        Creates a NameResolver for the given target URI, or null if the given URI cannot be resolved by this factory. The decision should be solely based on the scheme of the URI.
        Parameters:
        targetUri - the target URI to be resolved, whose scheme must not be null
        helper - utility that may be used by the NameResolver implementation
        Since:
        1.19.0
      • newNameResolver

        public NameResolver newNameResolver​(java.net.URI targetUri,
                                            NameResolver.Args args)
        Creates a NameResolver for the given target URI, or null if the given URI cannot be resolved by this factory. The decision should be solely based on the scheme of the URI.
        Parameters:
        targetUri - the target URI to be resolved, whose scheme must not be null
        args - other information that may be useful
        Since:
        1.21.0
      • getDefaultScheme

        public abstract java.lang.String getDefaultScheme()
        Returns the default scheme, which will be used to construct a URI when ManagedChannelBuilder.forTarget(String) is given an authority string instead of a compliant URI.
        Since:
        1.0.0