Source:
private void messageRouter(final SocketSession conn, final Request req, final MultiConnectionState state) { if (!req.hasRequestType()) { LOG.info("NO REQUEST TYPE SPECIFIED!!!!!!!!! ERROR ERROR"); send(conn, createBadConnectionResponse(req, RecognitionClientWebSocket.class)); } final String sessionID = state.getKey(); if (req.getRequestType() == MessageType.RECOGNITION) { LOG.info("REQUEST TYPE = RECOGNITION"); try { ((ProxyConnectionManager) this.getConnectionManager()).send(req, sessionID, RecognitionClientWebSocket.class); } catch (ConnectionException e) { LOG.error("Recognition error!"); send(conn, createBadConnectionResponse(req, RecognitionClientWebSocket.class)); } } else if (req.getRequestType() == MessageType.SUBMISSION) { LOG.info("REQUEST TYPE = SUBMISSION"); try { ((ProxyConnectionManager) this.getConnectionManager()).send(req, sessionID, AnswerClientWebSocket.class, ((ProxyConnectionState) state).getUserId()); } catch (ConnectionException e) { LOG.info(LoggingConstants.EXCEPTION_MESSAGE, e); send(conn, createBadConnectionResponse(req, AnswerClientWebSocket.class)); } } else if (req.getRequestType() == MessageType.DATA_REQUEST || req.getRequestType() == MessageType.DATA_INSERT || req.getRequestType() == MessageType.DATA_UPDATE || req.getRequestType() == MessageType.DATA_REMOVE) { LOG.info("REQUEST TYPE = DATA REQUEST"); try { ((ProxyConnectionManager) this.getConnectionManager()).send(req, sessionID, DataClientWebSocket.class, ((ProxyConnectionState) state).getUserId()); } catch (ConnectionException e) { LOG.info(LoggingConstants.EXCEPTION_MESSAGE, e); send(conn, createBadConnectionResponse(req, DataClientWebSocket.class)); } } }

Target:
private void messageRouter(final SocketSession conn, final Request req, final MultiConnectionState state) { if (!req.hasRequestType()) { LOG.error("A request type was not specified for this request. This request will not be processed"); LOG.error("Request that did not contain type: {}", req); send(conn, createBadConnectionResponse(req, RecognitionClientWebSocket.class)); } final String sessionID = state.getKey(); if (req.getRequestType() == MessageType.RECOGNITION) { LOG.info("REQUEST TYPE = RECOGNITION"); try { ((ProxyConnectionManager) this.getConnectionManager()).send(req, sessionID, RecognitionClientWebSocket.class); } catch (ConnectionException e) { LOG.error("Recognition error!"); send(conn, createBadConnectionResponse(req, RecognitionClientWebSocket.class)); } } else if (req.getRequestType() == MessageType.SUBMISSION) { LOG.info("REQUEST TYPE = SUBMISSION"); try { ((ProxyConnectionManager) this.getConnectionManager()).send(req, sessionID, AnswerClientWebSocket.class, ((ProxyConnectionState) state).getUserId()); } catch (ConnectionException e) { LOG.error(LoggingConstants.EXCEPTION_MESSAGE, e); send(conn, createBadConnectionResponse(req, AnswerClientWebSocket.class)); } } else if (req.getRequestType() == MessageType.DATA_REQUEST || req.getRequestType() == MessageType.DATA_INSERT || req.getRequestType() == MessageType.DATA_UPDATE || req.getRequestType() == MessageType.DATA_REMOVE) { LOG.info("REQUEST TYPE = DATA REQUEST"); try { ((ProxyConnectionManager) this.getConnectionManager()).send(req, sessionID, DataClientWebSocket.class, ((ProxyConnectionState) state).getUserId()); } catch (ConnectionException e) { LOG.error(LoggingConstants.EXCEPTION_MESSAGE, e); send(conn, createBadConnectionResponse(req, DataClientWebSocket.class)); } } }