@ExperimentalApi(value="https://github.com/grpc/grpc-java/issues/1771") public final class ConnectivityStateInfo extends java.lang.Object
ConnectivityState and its associated Status.
If the state is TRANSIENT_FAILURE, the status is never OK. For other states,
the status is always OK.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other) |
static ConnectivityStateInfo |
forNonError(ConnectivityState state)
Returns an instance for a state that is not
TRANSIENT_FAILURE. |
static ConnectivityStateInfo |
forTransientFailure(Status error)
Returns an instance for
TRANSIENT_FAILURE, associated with an error status. |
ConnectivityState |
getState()
Returns the state.
|
Status |
getStatus()
Returns the status associated with the state.
|
int |
hashCode() |
java.lang.String |
toString() |
public static ConnectivityStateInfo forNonError(ConnectivityState state)
TRANSIENT_FAILURE.java.lang.IllegalArgumentException - if state is TRANSIENT_FAILURE.public static ConnectivityStateInfo forTransientFailure(Status error)
TRANSIENT_FAILURE, associated with an error status.public ConnectivityState getState()
public Status getStatus()
If the state is TRANSIENT_FAILURE, the status is never OK. For other
states, the status is always OK.
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object