public boolean isServerAvailable ( ) { final Client client = getClient ( ) ; final ClientResponse response = client . resource ( serverURL ) . get ( ClientResponse . class ) ; if ( ClientResponse . Status . OK . getStatusCode ( ) == response . getStatus ( ) ) { return true ; } if ( LOG . isErrorEnabled ( ) ) { LOG . error ( String . format ( HTTP_STATUS_TEMPLATE_MSG , "Failed to reach the targeted Grapes server" , response . getStatus ( ) ) ) ; } client . destroy ( ) ; return false ; }
Checks if the dependency server is available