Package io.grpc.internal
Interface ClientTransport.PingCallback
-
- Enclosing interface:
- ClientTransport
public static interface ClientTransport.PingCallback
A callback that is invoked when the acknowledgement to aClientTransport.ping(io.grpc.internal.ClientTransport.PingCallback, java.util.concurrent.Executor)
is received. Exactly one of the two methods should be called perClientTransport.ping(io.grpc.internal.ClientTransport.PingCallback, java.util.concurrent.Executor)
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onFailure(java.lang.Throwable cause)
Invoked when a ping fails.void
onSuccess(long roundTripTimeNanos)
Invoked when a ping is acknowledged.
-
-
-
Method Detail
-
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
void onFailure(java.lang.Throwable cause)
Invoked when a ping fails. The given argument is the cause of the failure.- Parameters:
cause
- the cause of the ping failure
-
-