@Override public void initialize(Conversation c, ExperimentSettings expSettings) { super.initialize(c, expSettings); super.setIsTypingTimeOut(250); super.setProcessLoopSleepTime(80); expSettings.addParameter(lowerBoundForIntra); expSettings.addParameter(lowerBoundForInter); expSettings.addParameter(this.turnsSinceLastIntervention); expSettings.addParameter(timeoutCR_RESP); expSettings.addParameter(timeoutRESP_ACK); expSettings.addParameter(ackDelayMINIMALVALUE); expSettings.addParameter(ackDelayPLUSRANDOMAMOUNT); expSettings.addParameter(crDelayMINIMALVALUE); expSettings.addParameter(crDelayPLUSRANDOMAMOUNT); expSettings.addParameter(createDummyIntervention); expSettings.addParameter(dummyInterventionMaxLength); expSettings.addParameter(maxInterventionsPerMaze); }
@Override public void processCBYCTypingUnhinderedRequest( Participant sender, MessageCBYCTypingUnhinderedRequest mWTUR) { if (c.getParticipants().getAllParticipants().size() < 2) return; synchronized (this) { if (state == 1) return; } super.processCBYCTypingUnhinderedRequest(sender, mWTUR); }
@Override public void processCBYCDocChange(Participant sender, MessageCBYCDocChangeFromClient mCDC) { if (Debug.inCRENDOFTURNJUMPTOMAZE6) { // mgc = (MazeGameController2WAY)this.getC().getTaskController(); // if(mgc.getMazeNo()<6)mgc.moveToMazeNo(6); } // mostRecentText = mCDC.getDocChange().elementString; super.processCBYCDocChange(sender, mCDC); if (state == 3) this.timeOfLastState3DocChange = new Date().getTime(); System.err.println("The state on the server is: " + state); mostRecentText = ""; if (mCDC.getDocChange() instanceof diet.server.CbyC.DocInsert) { DocInsert di = (DocInsert) mCDC.getDocChange(); if (di.getOffs() == 0) { mostRecentText = "" + mCDC.getDocChange().elementString + di.str; mostRecentText = mostRecentText.replaceAll("\\n", ""); Conversation.printWSln("Main3", "----RECEIVINGDOCCHANGE: " + mostRecentText); } } }