Пример #1
0
  /** @param handler Set the {@link Handler} which should be wrapped. */
  public void setHandler(Handler handler) {
    if (isStarted()) throw new IllegalStateException(STARTED);

    if (handler != null) handler.setServer(getServer());

    updateBean(_handler, handler);
    _handler = handler;
  }
Пример #2
0
  /* ------------------------------------------------------------ */
  @Override
  public void setServer(Server server) {
    if (server == getServer()) return;

    if (isStarted()) throw new IllegalStateException(STARTED);

    super.setServer(server);
    Handler h = getHandler();
    if (h != null) h.setServer(server);
  }