code: protected void stopProxy() throws Exception {
      mProxyProcess.stop();
      if (mProxyThread != null) {
        while (mProxyThread.isAlive()) {
          LOG.info("Stopping thread {}.", mProxyThread.getName());
          mProxyThread.interrupt();
          mProxyThread.join(1000);
        }
        mProxyThread = null;
      }
    }
docs: Stops the proxy.