Examples of beforeClientRequest()


Examples of io.reactivex.netty.contexts.RequestIdProvider.beforeClientRequest()

        RequestIdProvider provider = new HttpRequestIdProvider(REQUEST_ID, CORRELATOR);
        AttributeMap attributeMap = new DefaultAttributeMap();
        ContextKeySupplier keySupplier = new MapBackedKeySupplier(new HashMap<String, String>());
        String expectedId = "daah";
        CORRELATOR.onNewServerRequest(expectedId, new ContextsContainerImpl(keySupplier));
        String requestId = provider.beforeClientRequest(attributeMap);

        Assert.assertSame("Unexpected request Id", expectedId, requestId);
    }

    @Test
View Full Code Here

Examples of io.reactivex.netty.contexts.RequestIdProvider.beforeClientRequest()

        RequestIdProvider provider = new HttpRequestIdProvider("request_id", CORRELATOR);
        AttributeMap attributeMap = new DefaultAttributeMap();
        ContextKeySupplier keySupplier = new MapBackedKeySupplier(new HashMap<String, String>());
        String expectedId = "daah";
        CORRELATOR.onNewServerRequest(expectedId, new ContextsContainerImpl(keySupplier));
        String requestId = provider.beforeClientRequest(attributeMap);
        Assert.assertSame("Unexpected request Id", expectedId, requestId);
        Assert.assertSame("Unexpected request Id on client response.", expectedId, provider.onClientResponse(attributeMap));
    }

    private static void onServerRequest(RequestIdProvider provider, AttributeMap attributeMap,
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.