Package org.apache.http.impl.nio.pool

Examples of org.apache.http.impl.nio.pool.BasicNIOPoolEntry


        Mockito.verify(this.connPool).lease(
                Mockito.eq(host), Mockito.isNull(), argCaptor.capture());
        ConnRequestCallback connRequestCallback = (ConnRequestCallback) argCaptor.getValue();

        future.cancel(true);
        BasicNIOPoolEntry entry = new BasicNIOPoolEntry("id", host, this.conn);
        connRequestCallback.completed(entry);
        Mockito.verify(this.connPool).release(entry, true);
        Mockito.verify(this.conn, Mockito.never()).requestOutput();
    }
View Full Code Here


        ArgumentCaptor<FutureCallback> argCaptor = ArgumentCaptor.forClass(FutureCallback.class);
        Mockito.verify(this.connPool).lease(
                Mockito.eq(host), Mockito.isNull(), argCaptor.capture());
        ConnRequestCallback connRequestCallback = (ConnRequestCallback) argCaptor.getValue();

        BasicNIOPoolEntry entry = new BasicNIOPoolEntry("id", host, this.conn);
        connRequestCallback.completed(entry);
        HttpAsyncClientExchangeHandlerImpl exchangeHandler = (HttpAsyncClientExchangeHandlerImpl) this.connContext.getAttribute(
                HttpAsyncClientProtocolHandler.HTTP_HANDLER);
        Assert.assertNotNull(exchangeHandler);
        Mockito.verify(this.conn).requestOutput();
View Full Code Here

        ArgumentCaptor<FutureCallback> argCaptor = ArgumentCaptor.forClass(FutureCallback.class);
        Mockito.verify(this.connPool).lease(
                Mockito.eq(host), Mockito.isNull(), argCaptor.capture());
        ConnRequestCallback connRequestCallback = (ConnRequestCallback) argCaptor.getValue();

        BasicNIOPoolEntry entry = new BasicNIOPoolEntry("id", host, this.conn);
        connRequestCallback.completed(entry);
        HttpAsyncClientExchangeHandlerImpl exchangeHandler = (HttpAsyncClientExchangeHandlerImpl) this.connContext.getAttribute(
                HttpAsyncClientProtocolHandler.HTTP_HANDLER);
        Assert.assertNotNull(exchangeHandler);
        Mockito.verify(this.conn).requestOutput();
View Full Code Here

        ArgumentCaptor<FutureCallback> argCaptor = ArgumentCaptor.forClass(FutureCallback.class);
        Mockito.verify(this.connPool).lease(
                Mockito.eq(host), Mockito.isNull(), argCaptor.capture());
        ConnRequestCallback connRequestCallback = (ConnRequestCallback) argCaptor.getValue();

        BasicNIOPoolEntry entry = new BasicNIOPoolEntry("id", host, this.conn);
        connRequestCallback.completed(entry);
        HttpAsyncClientExchangeHandlerImpl exchangeHandler = (HttpAsyncClientExchangeHandlerImpl) this.connContext.getAttribute(
                HttpAsyncClientProtocolHandler.HTTP_HANDLER);
        Assert.assertNotNull(exchangeHandler);
        Mockito.verify(this.conn).requestOutput();
View Full Code Here

            queue.add(this.connpool.lease(target, null));
        }

        while (!queue.isEmpty()) {
            Future<BasicNIOPoolEntry> future = queue.remove();
            BasicNIOPoolEntry poolEntry = future.get();
            Assert.assertNotNull(poolEntry);
        }

        Assert.assertEquals("Test client status", IOReactorStatus.ACTIVE, this.client.getStatus());
View Full Code Here

            queue.add(this.client.lease(target, null));
        }

        while (!queue.isEmpty()) {
            final Future<BasicNIOPoolEntry> future = queue.remove();
            final BasicNIOPoolEntry poolEntry = future.get();
            Assert.assertNotNull(poolEntry);
        }

        Assert.assertEquals("Test client status", IOReactorStatus.ACTIVE, this.client.getStatus());
View Full Code Here

        Mockito.verify(this.connPool).lease(
                Mockito.eq(host), Mockito.isNull(), argCaptor.capture());
        ConnRequestCallback connRequestCallback = (ConnRequestCallback) argCaptor.getValue();

        future.cancel(true);
        BasicNIOPoolEntry entry = new BasicNIOPoolEntry("id", host, this.conn);
        connRequestCallback.completed(entry);
        Mockito.verify(this.connPool).release(entry, true);
        Mockito.verify(this.conn, Mockito.never()).requestOutput();
    }
View Full Code Here

        ArgumentCaptor<FutureCallback> argCaptor = ArgumentCaptor.forClass(FutureCallback.class);
        Mockito.verify(this.connPool).lease(
                Mockito.eq(host), Mockito.isNull(), argCaptor.capture());
        ConnRequestCallback connRequestCallback = (ConnRequestCallback) argCaptor.getValue();

        BasicNIOPoolEntry entry = new BasicNIOPoolEntry("id", host, this.conn);
        connRequestCallback.completed(entry);
        BasicAsyncRequestExecutionHandler exchangeHandler = (BasicAsyncRequestExecutionHandler) this.connContext.getAttribute(
                HttpAsyncRequestExecutor.HTTP_HANDLER);
        Assert.assertNotNull(exchangeHandler);
        Mockito.verify(this.conn).requestOutput();
View Full Code Here

        ArgumentCaptor<FutureCallback> argCaptor = ArgumentCaptor.forClass(FutureCallback.class);
        Mockito.verify(this.connPool).lease(
                Mockito.eq(host), Mockito.isNull(), argCaptor.capture());
        ConnRequestCallback connRequestCallback = (ConnRequestCallback) argCaptor.getValue();

        BasicNIOPoolEntry entry = new BasicNIOPoolEntry("id", host, this.conn);
        connRequestCallback.completed(entry);
        BasicAsyncRequestExecutionHandler exchangeHandler = (BasicAsyncRequestExecutionHandler) this.connContext.getAttribute(
                HttpAsyncRequestExecutor.HTTP_HANDLER);
        Assert.assertNotNull(exchangeHandler);
        Mockito.verify(this.conn).requestOutput();
View Full Code Here

        ArgumentCaptor<FutureCallback> argCaptor = ArgumentCaptor.forClass(FutureCallback.class);
        Mockito.verify(this.connPool).lease(
                Mockito.eq(host), Mockito.isNull(), argCaptor.capture());
        ConnRequestCallback connRequestCallback = (ConnRequestCallback) argCaptor.getValue();

        BasicNIOPoolEntry entry = new BasicNIOPoolEntry("id", host, this.conn);
        connRequestCallback.completed(entry);
        BasicAsyncRequestExecutionHandler exchangeHandler = (BasicAsyncRequestExecutionHandler) this.connContext.getAttribute(
                HttpAsyncRequestExecutor.HTTP_HANDLER);
        Assert.assertNotNull(exchangeHandler);
        Mockito.verify(this.conn).requestOutput();
View Full Code Here

TOP

Related Classes of org.apache.http.impl.nio.pool.BasicNIOPoolEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.