static void pingHttpClient ( URI connection , PingCallback callback , HttpServerExchange exchange , UndertowClient client , XnioSsl xnioSsl , OptionMap options ) { final XnioIoThread thread = exchange . getIoThread ( ) ; final RequestExchangeListener exchangeListener = new RequestExchangeListener ( callback , NodeHealthChecker . NO_CHECK , true ) ; final Runnable r = new HttpClientPingTask ( connection , exchangeListener , thread , client , xnioSsl , exchange . getConnection ( ) . getByteBufferPool ( ) , options ) ; exchange . dispatch ( exchange . isInIoThread ( ) ? SameThreadExecutor . INSTANCE : thread , r ) ; // Schedule timeout task scheduleCancelTask ( exchange . getIoThread ( ) , exchangeListener , 5 , TimeUnit . SECONDS ) ; }
Try to ping a server using the undertow client .