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 TypeMethodDescriptionbooleanstatic NameResolver.ConfigOrErrorfromConfig(Object config) Returns aNameResolver.ConfigOrErrorfor the successfully parsed config.static NameResolver.ConfigOrErrorReturns aNameResolver.ConfigOrErrorfor the failure to parse the config.Returns config if exists, otherwise null.getError()Returns error status if exists, otherwise null.inthashCode()toString()
-
Method Details
-
fromConfig
Returns aNameResolver.ConfigOrErrorfor the successfully parsed config. -
fromError
Returns aNameResolver.ConfigOrErrorfor 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
-