Source:
public final void onMessage(final SocketSession conn, final Request req) { if (req.getRequestType() == Request.MessageType.TIME) { final Request rsp = TimeManager.decodeRequest(req); if (rsp != null) { send(conn, rsp); } return; } if (req.getRequestType() == Request.MessageType.SUBMISSION) { if (req.getResponseText().equals("student")) { final MultiConnectionState state = getConnectionToId().get(conn); LOG.info("Parsing as an experiment"); SrlExperiment student = null; try { student = SrlExperiment.parseFrom(req.getOtherData()); } catch (InvalidProtocolBufferException e1) { final Message.ProtoException protoEx = ExceptionUtilities.createProtoException(e1); conn.send(ExceptionUtilities.createExceptionRequest(protoEx, req)); LOG.error(LoggingConstants.EXCEPTION_MESSAGE, e1); return; } ((AnswerConnectionState) state).addPendingExperiment( req.getSessionInfo(), student); LOG.info("Student experiment {}", student); try { getConnectionManager().send(req, req.getSessionInfo() + "+" + state.getKey(), SubmissionClientWebSocket.class); } catch (ConnectionException e1) { LOG.error(LoggingConstants.EXCEPTION_MESSAGE, e1); final Message.ProtoException protoEx = ExceptionUtilities.createProtoException(e1); conn.send(ExceptionUtilities.createExceptionRequest(protoEx, req)); } final Request.Builder builder = Request.newBuilder(); builder.setRequestType(MessageType.DATA_REQUEST); builder.setSessionInfo(req.getSessionInfo() + "+" + state.getKey()); final ItemRequest.Builder itemRequest = ItemRequest.newBuilder(); itemRequest.setQuery(ItemQuery.SOLUTION); itemRequest.addItemId(student.getProblemId()); } else { try { getConnectionManager().send(req, req.getSessionInfo(), SubmissionClientWebSocket.class); } catch (ConnectionException e) { LOG.error(LoggingConstants.EXCEPTION_MESSAGE, e); } } } }

Target:
public final void onMessage(final SocketSession conn, final Request req) { if (req.getRequestType() == Request.MessageType.TIME) { final Request rsp = TimeManager.decodeRequest(req); if (rsp != null) { send(conn, rsp); } return; } if (req.getRequestType() == Request.MessageType.SUBMISSION) { if (req.getResponseText().equals("student")) { final MultiConnectionState state = getConnectionToId().get(conn); LOG.info("Parsing as an experiment"); SrlExperiment student = null; try { student = SrlExperiment.parseFrom(req.getOtherData()); } catch (InvalidProtocolBufferException e1) { final Message.ProtoException protoEx = ExceptionUtilities.createProtoException(e1); conn.send(ExceptionUtilities.createExceptionRequest(protoEx, req)); LOG.error(LoggingConstants.EXCEPTION_MESSAGE, e1); return; } ((AnswerConnectionState) state).addPendingExperiment( req.getSessionInfo(), student); LOG.info("Student experiment {}", student); try { getConnectionManager().send(req, req.getSessionInfo() + "+" + state.getKey(), SubmissionClientWebSocket.class); } catch (ConnectionException e1) { LOG.error(LoggingConstants.EXCEPTION_MESSAGE, e1); final Message.ProtoException protoEx = ExceptionUtilities.createProtoException(e1); conn.send(ExceptionUtilities.createExceptionRequest(protoEx, req)); } final Request.Builder builder = Request.newBuilder(); builder.setRequestType(MessageType.DATA_REQUEST); builder.setSessionInfo(req.getSessionInfo() + "+" + state.getKey()); final ItemRequest.Builder itemRequest = ItemRequest.newBuilder(); itemRequest.setQuery(ItemQuery.SOLUTION); itemRequest.addItemId(student.getProblemId()); } else { try { getConnectionManager().send(req, req.getSessionInfo(), SubmissionClientWebSocket.class); } catch (ConnectionException e) { LOG.error(LoggingConstants.EXCEPTION_MESSAGE, e); final Message.ProtoException protoEx = ExceptionUtilities.createProtoException(e); conn.send(ExceptionUtilities.createExceptionRequest(protoEx, req)); } } } }