Code example for BlockingQueue

Methods: poll

0
		 * Otherwise we can make a copy though the constructor 
		 * Location(Location copy) built in the Location type. 
		 */	 
		/* Retrieves and removes the head of this queue, 
		 * or returns null if this queue is empty. */ 
		return locQueue.poll();
	} 
	 
	/* "startSingle", "()Leu/tb/ZeSense/Location;" */ 
	public Location startSingle() {
		if (isStreaming) {
			return new Location(lastPolledLocation);
		} 
		locationManager.requestSingleUpdate(LocationManager.GPS_PROVIDER, locationListener, null);
		return null; 
	} 
	 
	/* "startStream", "(J)I" */ 
	public int startStream(long minTime) {
		locQueue.clear();
		locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, minTime, 0, locationListener);