/* ------------------------------------------------------------ */ @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); }
/* ------------------------------------------------------------ */ @Override public void destroy() { if (!isStopped()) throw new IllegalStateException("!STOPPED"); Handler child = getHandler(); if (child != null) { setHandler(null); child.destroy(); } super.destroy(); }