Code example for BlockingQueue

Methods: poll

    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);
	protected void setUp() throws Exception { 
		// Set up the MockClient 
		this.mockEntity = new MockHttpEntity();
		StatusLine statusLine = new BasicStatusLine(HttpVersion.HTTP_1_1,
    	this.mockResponse = new MockHttpResponse(this.mockEntity, statusLine);
    	this.mockClient = new MockHttpClient(this.mockResponse);
Stop searching for code, let great code find you!  Add Codota to your java IDE