title: correct implementation of the method messageReceived () (Netty)
body: <p>How to fix this writing methods <code>messageReceived()</code>.<br>
  More precisely how to configure the server's response depending on the content of the message connected client.</p>
  
  <pre><code>String fromClientData ="";
  String [] params;
  User user;
  @Override
  public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws IOException {
      fromClientData = e.getMessage().toString();
      params = fromClientData.split(";");
      String idOrDemo = params[1];
  
      if (params[0].equals("demo")) {
          user = useService.getById(idOrDemo);
          e.getChannel().write("demo;" + user.getId() + ";");
      }
  
      if (params[0].equals("site")) {
          Integer id = Integer.parseInt(idOrDemo);
          user = userService2.getById(id);
  
          if (params[2].split(":")[0].equals("SOME")) {
              //todo something
          }
  
          ctx.getChannel().write("SOME:" + str + ";");    
      } else {
  
          user.setChannelUser(e.getChannel());
          if (params[1].equals("updateCache")) {
              sendUpdate();
          }
          else {
              setClient();
          }
      }
      } else {
          Integer id = Integer.parseInt(idOrDemo);
          user = userService.getById(id);
  
          user.setChannelUser(e.getChannel());
          if (params[1].equals("updateCache")) {
              sendUpdate();
          }
          else {
              setClient();
          }
      }
  }
  </code></pre>