Package io.reactivex.netty.contexts

Examples of io.reactivex.netty.contexts.BidirectionalTestContextSerializer


    }

    private static DefaultHttpResponse createResponseWithCtxHeaders(HandlerHolder holder)
            throws ContextSerializationException {
        DefaultHttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK);
        holder.addSerializedContext(response, CTX_1_NAME, CTX_1_VAL, new BidirectionalTestContextSerializer());
        return response;
    }
View Full Code Here


    private static void sendRequestAndAssert(HandlerHolder holder) throws Exception {
        holder.correlator.onNewServerRequest(holder.requestId, new ContextsContainerImpl(holder.keySupplier));

        try {
            DefaultHttpRequest request = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "");
            holder.addSerializedContext(request, CTX_1_NAME, CTX_1_VAL, new BidirectionalTestContextSerializer());
            holder.handler.write(holder.ctx, request, holder.ctx.newPromise());

            Assert.assertNotNull("Context container not set after request sent.",
                                 ContextAttributeStorageHelper.getContainer(holder.ctx, holder.requestId));
View Full Code Here

        ContextsContainer container = ContextAttributeStorageHelper.getContainer(holder.ctx, holder.requestId);
        String ctx2Name = "ctx2";
        BidirectionalTestContext ctx2 = new BidirectionalTestContext(ctx2Name);

        container.addContext(ctx2Name, ctx2, new BidirectionalTestContextSerializer());

        HttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK);

        holder.handler.write(holder.ctx, response, holder.ctx.newPromise());
View Full Code Here

TOP

Related Classes of io.reactivex.netty.contexts.BidirectionalTestContextSerializer

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.