public void setState(boolean isEnabled, boolean isRemoteActivityEnabled, boolean isPreferRemoteSchemas) {
    myState = new MyState(isEnabled, isRemoteActivityEnabled, isPreferRemoteSchemas);
    for (Runnable handler : myChangeHandlers) {
      handler.run();
    }
  }
public void setState(boolean isEnabled, boolean isRemoteActivityEnabled, boolean isPreferRemoteSchemas)