Package io.grpc
Class NameResolver.ConfigOrError
java.lang.Object
io.grpc.NameResolver.ConfigOrError
- Enclosing class:
NameResolver
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1770")
public static final class NameResolver.ConfigOrError
extends Object
Represents either a successfully parsed service config, containing all necessary parts to be
later applied by the channel, or a Status containing the error encountered while parsing.
- Since:
- 1.20.0
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static NameResolver.ConfigOrError
fromConfig
(Object config) Returns aNameResolver.ConfigOrError
for the successfully parsed config.static NameResolver.ConfigOrError
Returns aNameResolver.ConfigOrError
for the failure to parse the config.Returns config if exists, otherwise null.getError()
Returns error status if exists, otherwise null.int
hashCode()
toString()
-
Method Details
-
fromConfig
Returns aNameResolver.ConfigOrError
for the successfully parsed config. -
fromError
Returns aNameResolver.ConfigOrError
for the failure to parse the config.- Parameters:
status
- a non-OK status
-
getConfig
Returns config if exists, otherwise null. -
getError
Returns error status if exists, otherwise null. -
equals
-
hashCode
public int hashCode() -
toString
-