@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1770") public static final class NameResolver.ConfigOrError extends java.lang.Object
Attributes.EMPTY
will be returned.Modifier and Type | Method | Description |
---|---|---|
static NameResolver.ConfigOrError |
fromConfig(java.lang.Object config) |
Returns a
NameResolver.ConfigOrError for the successfully parsed config. |
static NameResolver.ConfigOrError |
fromError(Status status) |
Returns a
NameResolver.ConfigOrError for the failure to parse the config. |
java.lang.Object |
getConfig() |
Returns config if exists, otherwise null.
|
Status |
getError() |
Returns error status if exists, otherwise null.
|
java.lang.String |
toString() |
public static NameResolver.ConfigOrError fromConfig(java.lang.Object config)
NameResolver.ConfigOrError
for the successfully parsed config.public static NameResolver.ConfigOrError fromError(Status status)
NameResolver.ConfigOrError
for the failure to parse the config.status
- a non-OK status@Nullable public java.lang.Object getConfig()
@Nullable public Status getError()
public java.lang.String toString()
toString
in class java.lang.Object