Package com.proofpoint.http.client

Examples of com.proofpoint.http.client.SyncToAsyncWrapperClient


    }

    @Override
    protected SyncToAsyncWrapperClient createBalancingHttpClient()
    {
        return new SyncToAsyncWrapperClient(
                new BalancingHttpClient(serviceBalancer, httpClient,
                        new BalancingHttpClientConfig().setMaxAttempts(3)));
    }
View Full Code Here


    {
        RequestStats requestStats = new RequestStats();
        HttpClient mockClient = mock(HttpClient.class);
        when(mockClient.getStats()).thenReturn(requestStats);

        balancingHttpClient = new SyncToAsyncWrapperClient(
                new BalancingHttpClient(serviceBalancer, mockClient, new BalancingHttpClientConfig()));
        assertSame(balancingHttpClient.getStats(), requestStats);

        verify(mockClient).getStats();
        verifyNoMoreInteractions(mockClient, serviceBalancer);
View Full Code Here

    @Test
    public void testClose()
    {
        HttpClient mockClient = mock(HttpClient.class);

        balancingHttpClient = new SyncToAsyncWrapperClient(
                new BalancingHttpClient(serviceBalancer, mockClient, new BalancingHttpClientConfig()));
        balancingHttpClient.close();

        verify(mockClient).close();
        verifyNoMoreInteractions(mockClient, serviceBalancer);
View Full Code Here

TOP

Related Classes of com.proofpoint.http.client.SyncToAsyncWrapperClient

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.