MCPcopy Create free account
hub / github.com/grpc/grpc-java / asRunnable

Method asRunnable

core/src/main/java/io/grpc/internal/Http2Ping.java:191–200  ·  view source on GitHub ↗

Returns a runnable that, when run, invokes the given callback, providing the given round-trip duration.

(final ClientTransport.PingCallback callback,
                                     final long roundTripTimeNanos)

Source from the content-addressed store, hash-verified

189 * duration.
190 */
191 private static Runnable asRunnable(final ClientTransport.PingCallback callback,
192 final long roundTripTimeNanos) {
193 return new Runnable() {
194 @Override
195 public void run() {
196 callback.onSuccess(roundTripTimeNanos);
197 }
198 };
199
200 }
201
202 /**
203 * Returns a runnable that, when run, invokes the given callback, providing the given cause of

Callers 3

addCallbackMethod · 0.95
completeMethod · 0.95
notifyFailedMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected