Send a ending notification to Mini ROX

@param projectName The project name
@param projectVersion The project version
@param category The category
@param duration The duration of the test run
543259
public void notifyEnd(String projectName, String projectVersion, String category, long duration) {
		try {
			if (isStarted()) {
				JSONObject endNotification = new JSONObject().
					put("project", new JSONObject().
						put("name", projectName).
						put("version", projectVersion)
					).
					put("category", category).
					put("duration", duration);
				
				socket.emit("run:end", endNotification);
			}
			else {
				LOGGER.warn("Minirox is not available to send the end notification");
			}
		}
		catch (Exception e) {
			LOGGER.info("Unable to send the end notification to MINI ROX. Cause: {}", e.getMessage());
			
			if (LOGGER.isDebugEnabled()) {
				LOGGER.debug("Exception: ", e);
			}
		}
	}
433458
public TimerType<T> end(java.util.Date end)
   {
      if (end != null)
      {
         childNode.getOrCreate("end").text(XMLDate.toXMLFormat(end));
         return this;
      }
      return null;
   }
1285113
@Override
    public void prepare(MissionInit missionInit)
    {
        super.prepare(missionInit);
        MinecraftForge.EVENT_BUS.register(this);
        MalmoMod.MalmoMessageHandler.registerForMessage(this, MalmoMessageType.SERVER_BUILDBATTLEREWARD);

        if (this.rscparams.getAddQuitProducer() != null)
        {
            // In order to trigger the end of the mission, we need to hook into the quit handlers.
            MissionBehaviour mb = parentBehaviour();
            final String quitDescription = this.rscparams.getAddQuitProducer().getDescription();
            mb.addQuitProducer(new IWantToQuit()
            {
                @Override
                public void prepare(MissionInit missionInit)
                {
                }
    
                @Override
                public String getOutcome()
                {
                    return quitDescription;
                }
    
                @Override
                public boolean doIWantToQuit(MissionInit missionInit)
                {
                    return RewardForStructureCopyingImplementation.this.structureHasBeenCompleted;
                }
    
                @Override
                public void cleanup()
                {
                }
            });
        }
    }
992130
public void end() {
        if (this.sectionName != null) {
            Log.d(TAG, "" + this.sectionName + " loaded in " + (ActorTime.currentTime() - sectionStart) + " ms");
            this.sectionName = null;
        }
    }
610849
public void removeProject(String projectName) {
        // It should only be in list once (usually in slot 0) but check entire
        // list...
        Iterator<String> it = recentProjectsList.iterator();
        while (it.hasNext()) {
            // LinkedList, so remove() via iterator is faster than
            // remove(index).
            if (projectName.equals(it.next())) {
                it.remove();
            }
        }
    }
1089673
private void endClientExecution(AWSRequestMetrics awsRequestMetrics,
                                          RequestConfig requestConfig,
                                          Request<?> request,
                                          Response<?> response) {
        if (request != null) {
            awsRequestMetrics.endEvent(AWSRequestMetrics.Field.ClientExecuteTime);
            awsRequestMetrics.getTimingInfo().endTiming();
            RequestMetricCollector metricCollector = findRequestMetricCollector(requestConfig);
            metricCollector.collectMetrics(request, response);
            awsRequestMetrics.log();
        }
    }
258318
public void onSiteOrProjectChange(CmsProject project, String siteRoot) {

        if ((siteRoot != null) && !siteRoot.equals(getSiteRootFromState())) {
            changeSite(siteRoot, null, true);
        } else if ((project != null) && !project.getUuid().equals(getProjectIdFromState())) {
            openPath(getPathFromState(), true);
        }
        m_appContext.updateOnChange();
        setToolbarButtonsEnabled(!CmsAppWorkplaceUi.isOnlineProject());
    }
724369
void syncBugInformation() {
        boolean prevProjectChanged = projectChanged;
        if (mainFrameTree.getCurrentSelectedBugLeaf() != null) {
            BugInstance bug = mainFrameTree.getCurrentSelectedBugLeaf().getBug();
            displayer.displaySource(bug, bug.getPrimarySourceLineAnnotation());
            updateSummaryTab(mainFrameTree.getCurrentSelectedBugLeaf());
        } else if (currentSelectedBugAspects != null) {
            displayer.displaySource(null, null);
            clearSummaryTab();
        } else {
            displayer.displaySource(null, null);
            clearSummaryTab();
        }
        setProjectChanged(prevProjectChanged);
    }
1034330
protected boolean existsProject(String projectName) {

        try {
            m_adminCms.readProject(projectName);
            return true;
        } catch (CmsException e) {
            return false;
        }
    }
668279
protected void notifyEndBundlingProcess() {

		processingBundle.set(false);
		synchronized (processingBundle) {
			processingBundle.notifyAll();
		}

		for (BundlingProcessLifeCycleListener listener : lifeCycleListeners) {
			listener.afterBundlingProcess();
		}

	}
964735
public void endInterval(int lastIndex) {
        if (isOpen) {
            currentDetail.setLast(lastIndex);
            pathDetails.add(currentDetail);
        }
        isOpen = false;
    }
961001
@Override
    protected void processTerm(int linger)
    {
        //  Double termination should never happen.
        assert (!terminating);

        //  Send termination request to all owned objects.
        for (Own it : owned) {
            sendTerm(it, linger);
        }
        registerTermAcks(owned.size());
        owned.clear();

        //  Start termination process and check whether by chance we cannot
        //  terminate immediately.
        terminating = true;
        checkTermAcks();
    }
465672
public void useProject(String projectName) {
        removeProject(projectName);
        recentProjectsList.addFirst(projectName);
        while (recentProjectsList.size() > MAX_RECENT_FILES) {
            recentProjectsList.removeLast();
        }
    }
539254
private void sendOnPlayStatus(String code, int duration, long bytes) {
        if (log.isDebugEnabled()) {
            log.debug("Sending onPlayStatus - code: {} duration: {} bytes: {}", code, duration, bytes);
        }
        // create the buffer
        IoBuffer buf = IoBuffer.allocate(102);
        buf.setAutoExpand(true);
        Output out = new Output(buf);
        out.writeString("onPlayStatus");
        ObjectMap<Object, Object> args = new ObjectMap<>();
        args.put("code", code);
        args.put("level", Status.STATUS);
        args.put("duration", duration);
        args.put("bytes", bytes);
        String name = currentItem.get().getName();
        if (StatusCodes.NS_PLAY_TRANSITION_COMPLETE.equals(code)) {
            args.put("clientId", streamId);
            args.put("details", name);
            args.put("description", String.format("Transitioned to %s", name));
            args.put("isFastPlay", false);
        }
        out.writeObject(args);
        buf.flip();
        Notify event = new Notify(buf, "onPlayStatus");
        if (lastMessageTs > 0) {
            event.setTimestamp(lastMessageTs);
        } else {
            event.setTimestamp(0);
        }
        RTMPMessage msg = RTMPMessage.build(event);
        doPushMessage(msg);
    }
355443
def project_name_changed(self, widget, data=None):
        
        if widget.get_text() != "":
            self.run_btn.set_sensitive(True)
        else:
            self.run_btn.set_sensitive(False)
        self.update_full_label()
704146
public void endTiming(String name, float elapsed) {
		Counter counter = get(name, CounterType.Interval);
		calculateStats(counter, elapsed);
		update();
	}
288519
public void sendRequest(Message request, Object context, Message.Builder responseBuilder,
                          Duration timeout) {
    // Pack it as a no-timeout request and send it!
    final REQID rid = REQID.generate();
    contextMap.put(rid, context);
    responseMessageMap.put(rid, responseBuilder);

    // Add timeout for this request if necessary
    if (timeout.getSeconds() > 0) {
      registerTimerEvent(timeout, new Runnable() {
        @Override
        public void run() {
          handleTimeout(rid);
        }
      });
    }

    OutgoingPacket opk = new OutgoingPacket(rid, request);
    socketChannelHelper.sendPacket(opk);
  }