public void shutdown() {
		try {
			registry.unbind(bindingName);
		} catch (AccessException e) {
			logger.error("couldn't unbind the Registry");
		} catch (RemoteException e) {
			logger.error("couldn't unbind the Registry");
		} catch (NotBoundException e) {
			logger.error("couldn't unbind the Registry");
		}
		try {
			 UnicastRemoteObject.unexportObject(mClientHandler, true);
		} catch (NoSuchObjectException e) {
			logger.error("couldn't unexport the Stub");
		}
		
		// propper shutdown of the ExecutorService
		analServerExecutionService.shutdown(); // Disable new tasks from being submitted
		try {
			// Wait a while for existing tasks to terminate
			if (!analServerExecutionService.awaitTermination(3, TimeUnit.SECONDS)) {
				analServerExecutionService.shutdownNow(); // Cancel currently executing tasks
				// Wait a while for tasks to respond to being cancelled
				if (!analServerExecutionService.awaitTermination(3, TimeUnit.SECONDS))
					logger.error("Pool did not terminate");
				}
		} catch (InterruptedException ie) {
			// (Re-)Cancel if current thread also interrupted
			analServerExecutionService.shutdownNow();
			// Preserve interrupt status
			Thread.currentThread().interrupt();
		}
		logger.debug("shutdown complete.");
	}