NameResolver.Listener2
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1770") @ThreadSafe public static interface NameResolver.Listener
All methods are expected to return quickly.
Modifier and Type | Method | Description |
---|---|---|
void |
onAddresses(java.util.List<EquivalentAddressGroup> servers,
Attributes attributes) |
Handles updates on resolved addresses and attributes.
|
void |
onError(Status error) |
Handles an error from the resolver.
|
void onAddresses(java.util.List<EquivalentAddressGroup> servers, @ResolutionResultAttr Attributes attributes)
Implementations will not modify the given servers
.
servers
- the resolved server addresses. An empty list will trigger onError(io.grpc.Status)
attributes
- extra information from naming system.void onError(Status error)
NameResolver.refresh()
to re-attempt resolution.error
- a non-OK status