public String checkMessagingConnectionForTheDm ( String message ) throws DebugWsException { this . logger . finer ( "Checking messaging connection with the DM: message=" + message ) ; WebResource path = this . resource . path ( UrlConstants . DEBUG ) . path ( "check-dm" ) ; if ( message != null ) path = path . queryParam ( "message" , message ) ; ClientResponse response = this . wsClient . createBuilder ( path ) . get ( ClientResponse . class ) ; if ( Family . SUCCESSFUL != response . getStatusInfo ( ) . getFamily ( ) ) { String value = response . getEntity ( String . class ) ; this . logger . finer ( response . getStatusInfo ( ) + ": " + value ) ; throw new DebugWsException ( response . getStatusInfo ( ) . getStatusCode ( ) , value ) ; } this . logger . finer ( String . valueOf ( response . getStatusInfo ( ) ) ) ; return response . getEntity ( String . class ) ; }
Checks the DM is correctly connected with the messaging server .