Code example for LinkedBlockingQueue

Methods: offer

0
		 
		HashMap<String, String> entry = new HashMap<String, String>();
		entry.put("path", path);
		entry.put("name", name);
		sendNotification(name, "Queued...");
		queue.offer(entry);
 
	} 
	 
	@Override 
	public void onDestroy() { 
		super.onDestroy(); 
		if (workerThread != null) workerThread.stop();
		queue.clear();
        Utils.shutdownHttpClient(httpClient);
	} 
 
	private void sendNotification(String title, String message) { 
        Notification notification = new Notification(
        		R.drawable.icon, message + " " + title, System.currentTimeMillis());