public void shutdown() throws InterruptedException {
   logger.trace("Shutting down client pool");
   // Signal the stop to the thread.
   Stop stop = new Stop();
   stopSignal.add(stop);
   // Wait for the stop to complete.
   stop.waitForStopped();
   // Close the pool - Added
   try {
     threadSafeClient.close();
   } catch (IOException ioe) {
     logger.info("IO Exception while closing HttpClient connecntions.");
   }
   // Close the connection manager.
   cm.close();
   logger.trace("Client pool shut down");
 }