code: private void doSubscribe(boolean subscribe) {
          for (String eventName : eventNames) {
              if (subscribe) {
                  eventManager.subscribe(eventName, this);
              } else {
                  eventManager.unsubscribe(eventName, this);
              }
          }
      }
docs: Subscribe/unsubscribe to/from specified events.
  
  @param subscribe If true, subscribe; if false, unsubscribe.