private static Runnable asRunnable ( final ClientTransport . PingCallback callback , final Throwable failureCause ) { return new Runnable ( ) { @ Override public void run ( ) { callback . onFailure ( failureCause ) ; } } ; }
Returns a runnable that when run invokes the given callback providing the given cause of failure .