code: public synchronized void stop() {
  		LOG.debug("Stopping server on " + port);
  		running = false;
  		if (handlers != null) {
  			for (int i = 0; i < handlerCount; i++) {
  				if (handlers[i] != null) {
  					handlers[i].interrupt();
  				}
  			}
  		}
  		listener.interrupt();
  		listener.doStop();
  		responder.interrupt();
  		notifyAll();
  
  		// Wait until shut down of handlers is complete
  		if (this.handlers != null) {
  
  			while (true) {
  
  				int i = 0;
  				for (; i < this.handlerCount; i++) {
  					if (this.handlers[i] != null) {
  						if (!this.handlers[i].isShutDown()) {
  							break;
  						}
  					}
  				}
  
  				if (i < this.handlerCount) {
  					try {
  						wait(100);
  					} catch (InterruptedException e) {
  						break;
  					}
  				} else {
  					// exit while loop
  					break;
  				}
  			}
  		}
  
  		// Wait until shut down of responder is complete
  		while (!this.responder.isShutDown()) {
  			try {
  				wait(100);
  			} catch (InterruptedException e) {
  				break;
  			}
  		}
  
  		// Wait until shut down of listener is complete
  		while (!this.listener.isShutDown()) {
  			try {
  				wait(100);
  			} catch (InterruptedException e) {
  				break;
  			}
  		}
  	}
docs: Stops the service. No new calls will be handled after this is called.