Code example for SynchronousQueue

Methods: poll

0
     * 
     * @return false if timeout, true if response received 
     * @throws InterruptedException 
     */ 
    public EventObject block() throws InterruptedException {
        return m_queue.poll(5000, TimeUnit.MILLISECONDS);
    } 
 
    public void response(ResponseEvent responseEvent) {
        try { 
            Response response = responseEvent.getResponse();
            ClientTransaction clientTransaction = responseEvent.getClientTransaction();
            Dialog dialog = clientTransaction.getDialog();
            String method = m_helper.getCSeqMethod(response);
            LOG.debug("method = " + method);
            LOG.debug("Operator = " + m_operator);
            if (response.getStatusCode() == Response.PROXY_AUTHENTICATION_REQUIRED) {
                if (m_counter == 1) {               
                    m_helper.tearDownDialog(dialog);
                    return; 
Experience pair programming with AI  Get Codota for Java