Code example for BlockingQueue

Methods: removeAll

0
	/** 
	 * Method that stops the service, removes everything from the waiting list 
	 */ 
	public void stopService() { 
 
		waitingList.removeAll(waitingList);
		isWaitingListRunning.set(false);
		callbackListener = null;
		isTheServiceRunning.set(false);
		 
		ECApplication application = (ECApplication) getApplication();
		application.stopLocating();
 
		try { 
			bluetoothSocket.close();
		} catch (Exception e) {
			logger.warn(e.getMessage(), e);
		} 
 
		stopSelf();
	}