Code example for BlockingQueue

Methods: poll

0
    protected LiveOperationException pollExceptionQueue() throws InterruptedException { 
        return this.exceptionQueue.poll(WAIT_TIME_IN_SECS, TimeUnit.SECONDS);
    } 
 
    protected OperationType pollResponseQueue() throws InterruptedException { 
        return this.responseQueue.poll(WAIT_TIME_IN_SECS, TimeUnit.SECONDS);
    } 
 
	@Override 
	protected void setUp() throws Exception { 
		super.setUp(); 
 
		// Set up the MockClient 
		this.mockEntity = new MockHttpEntity();
 
		StatusLine statusLine = new BasicStatusLine(HttpVersion.HTTP_1_1,
		                                            HttpStatus.SC_OK,
		                                            "OK"); 
    	this.mockResponse = new MockHttpResponse(this.mockEntity, statusLine);
    	this.mockClient = new MockHttpClient(this.mockResponse);
        this.loadLiveLibraryHeaderChecker();