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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
static NameResolver.ConfigOrError
fromConfig(Object config)
Returns aNameResolver.ConfigOrError
for the successfully parsed config.static NameResolver.ConfigOrError
fromError(Status status)
Returns aNameResolver.ConfigOrError
for the failure to parse the config.Object
getConfig()
Returns config if exists, otherwise null.Status
getError()
Returns error status if exists, otherwise null.int
hashCode()
String
toString()
-
-
-
Method Detail
-
fromConfig
public static NameResolver.ConfigOrError fromConfig(Object config)
Returns aNameResolver.ConfigOrError
for the successfully parsed config.
-
fromError
public static NameResolver.ConfigOrError fromError(Status status)
Returns aNameResolver.ConfigOrError
for the failure to parse the config.- Parameters:
status
- a non-OK status
-
-