code: public void parseServiceList(String message) {
      // We expect the service list to be in this format:
      //   *245 service-list window-manager,core,ecmascript-service
      List<String> services;
  
      try {
        services = ImmutableList.copyOf(Splitter.on(',').split(message.split(" ")[2]));
      } catch (ArrayIndexOutOfBoundsException e) {
        connectionHandler.onException(
            new IllegalStateException(String.format("Invalid service list received: %s", message)));
        return;
      }
  
      logger.fine(String.format("Available services: %s", services));
      connectionHandler.onServiceList(services);
  
      if (!services.contains("stp-1")) {
        connectionHandler.onException(new IllegalStateException("STP/0 is not supported!"));
        return;
      }
  
      switchToStp1();
    }
docs: Processes an incoming message and passes it to event handler if needed, the following events
  are to our interest:
  
  Runtime-Started: ecmascript runtime starts in Opera (that we can inject to)
  
  Runtime-Stopped: ecmascript runtime stops (not used, buggy)
  
  Message: fired from console log event
  
  Updated-Window: a window is updated OR created (opener-id=0)
  
  Active-Window: window focus changed
  
  Window-Closed: self explanatory If message matches none it is added to the response queue
  (probably response to command).