code: private void publish(String buffer){
          CommandResult out = new CommandResult(myType);
  
          out.setContent(buffer);
  
          synchronized (lock) {
              publisher.publish(topic, out.toString());
          }
      }
docs: Use the Publisher in order to broadcast the command result through the web-socket.
  
  @param buffer the buffer in which data is written