Examples of SyncToAsyncWrapperClient


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

Examples of com.proofpoint.http.client.SyncToAsyncWrapperClient

    {
        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

Examples of com.proofpoint.http.client.SyncToAsyncWrapperClient

    @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
Copyright © 2018 www.massapi.com. 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.