Code example for LinkedBlockingQueue

Methods: put

0
	} 
	 
	public void processInputEvent(PositionEvent posEvent)
	{ 
		try { 
			inputEventQueue.put(posEvent);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
		} 
	} 
	 
	public void run() { 
		 
		for(;;) 
		{ 
			try { 
				PositionEvent positionEvent = inputEventQueue.take();
				System.out.println("Thread= " + Thread.currentThread() + " Event= " + positionEvent.toString());
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block