@Override
	public void processMessage(WebSocketMessage webSocketData) throws FrameworkException {

		setDoTransactionNotifications(true);

		final String mode                     = webSocketData.getNodeDataStringValue("mode");		// default: list    start | pause | resume | cancel | abort
		final Long jobId                      = webSocketData.getNodeDataLongValue("jobId");

		final JobQueueManager mgr = JobQueueManager.getInstance();

		final List<GraphObject> result = new LinkedList<>();

		switch (mode) {

			case "start":
				mgr.startJob(jobId);
				break;

			case "pause":
				mgr.pauseRunningJob(jobId);
				break;

			case "resume":
				mgr.resumePausedJob(jobId);
				break;

			case "abort":
				mgr.abortActiveJob(jobId);
				break;

			case "cancel":
				mgr.cancelQueuedJob(jobId);
				break;

			case "list":
			default:
				final GraphObjectMap importsContainer = new GraphObjectMap();

				importsContainer.put(importJobsProperty, mgr.listJobs());
				result.add(importsContainer);
		}

			webSocketData.setResult(result);
			webSocketData.setRawResultCount(1);
			getWebSocket().send(webSocketData, true);

	}
@ Override public void processMessage ( WebSocketMessage webSocketData ) throws FrameworkException { setDoTransactionNotifications ( true ) ; final String mode = webSocketData . getNodeDataStringValue ( "mode" ) ; final Long jobId = webSocketData . getNodeDataLongValue ( "jobId" ) ; final JobQueueManager mgr = JobQueueManager . getInstance ( ) ; final List < GraphObject > result = new LinkedList < > ( ) ; switch ( mode ) { case "start" : mgr . startJob ( jobId ) ; break ; case "pause" : mgr . pauseRunningJob ( jobId ) ; break ; case "resume" : mgr . resumePausedJob ( jobId ) ; break ; case "abort" : mgr . abortActiveJob ( jobId ) ; break ; case "cancel" : mgr . cancelQueuedJob ( jobId ) ; break ; case "list" : default : final GraphObjectMap importsContainer = new GraphObjectMap ( ) ; importsContainer . put ( importJobsProperty , mgr . listJobs ( ) ) ; result . add ( importsContainer ) ; } webSocketData . setResult ( result ) ; webSocketData . setRawResultCount ( 1 ) ; getWebSocket ( ) . send ( webSocketData , true ) ; }
~--- methods --------------------------------------------------------