public void notifyEnd(String projectApiId, String projectVersion, String category, long duration) {
		try {
			if (isStarted()) {
				JSONObject endNotification = new JSONObject().
					put("project", new JSONObject().
						put("apiId", projectApiId).
						put("version", projectVersion)
					).
					put("category", category).
					put("duration", duration);
				
				socket.emit("run:end", endNotification);
			}
			else {
				LOGGER.log(Level.WARNING, "Probe Dock RT is not available to send the end notification");
			}
		}
		catch (Exception e) {
			LOGGER.log(Level.INFO, "Unable to send the end notification to the agent. Cause: " + e.getMessage());
			
			if (LOGGER.getLevel() == Level.FINEST) {
				LOGGER.log(Level.FINEST, "Exception:", e);
			}
		}
	}
public void notifyEnd ( String projectApiId , String projectVersion , String category , long duration ) { try { if ( isStarted ( ) ) { JSONObject endNotification = new JSONObject ( ) . put ( "project" , new JSONObject ( ) . put ( "apiId" , projectApiId ) . put ( "version" , projectVersion ) ) . put ( "category" , category ) . put ( "duration" , duration ) ; socket . emit ( "run:end" , endNotification ) ; } else { LOGGER . log ( Level . WARNING , "Probe Dock RT is not available to send the end notification" ) ; } } catch ( Exception e ) { LOGGER . log ( Level . INFO , "Unable to send the end notification to the agent. Cause: " + e . getMessage ( ) ) ; if ( LOGGER . getLevel ( ) == Level . FINEST ) { LOGGER . log ( Level . FINEST , "Exception:" , e ) ; } } }
Send a ending notification to the agent

@param projectApiId The project API ID
@param projectVersion The project version
@param category The category
@param duration The duration of the test run