Package io.grpc.internal
Interface ClientTransport.PingCallback
- Enclosing interface:
ClientTransport
public static interface ClientTransport.PingCallback
A callback that is invoked when the acknowledgement to a
ClientTransport.ping(io.grpc.internal.ClientTransport.PingCallback, java.util.concurrent.Executor)
is received. Exactly one
of the two methods should be called per ClientTransport.ping(io.grpc.internal.ClientTransport.PingCallback, java.util.concurrent.Executor)
.-
Method Summary
-
Method Details
-
onSuccess
void onSuccess(long roundTripTimeNanos) Invoked when a ping is acknowledged. The given argument is the round-trip time of the ping, in nanoseconds.- Parameters:
roundTripTimeNanos
- the round-trip duration between the ping being sent and the acknowledgement received
-
onFailure
Invoked when a ping fails. The given argument is the cause of the failure.- Parameters:
cause
- the cause of the ping failure
-