Examples of produceContent()


Examples of org.apache.http.nio.entity.ProducingNHttpEntity.produceContent()

        final HttpResponse response = conn.getHttpResponse();

        try {
            final ProducingNHttpEntity entity = connState.getProducingEntity();
            entity.produceContent(encoder, conn);

            if (encoder.isCompleted()) {
                connState.finishOutput();
                if (!this.connStrategy.keepAlive(response, context)) {
                    conn.close();
View Full Code Here

Examples of org.apache.http.nio.entity.ProducingNHttpEntity.produceContent()

        HttpResponse response = conn.getHttpResponse();

        try {
            ProducingNHttpEntity entity = connState.getProducingEntity();
            entity.produceContent(encoder, conn);

            if (encoder.isCompleted()) {
                connState.finishOutput();
                if (!this.connStrategy.keepAlive(response, context)) {
                    conn.close();
View Full Code Here

Examples of org.apache.http.nio.protocol.AsyncHttpService.produceContent()

        public void outputReady(NHttpServerConnection conn, ContentEncoder encoder) {
            AsyncHttpService httpService = (AsyncHttpService) conn.getContext()
                .getAttribute(HTTP_ASYNC_SERVICE);
            try {
                httpService.produceContent(encoder);
            } catch (IOException ex) {
                httpService.shutdown(ex);
                shutdownConnection(conn);
            }
        }
View Full Code Here

Examples of org.apache.http.nio.protocol.HttpAsyncRequestProducer.produceContent()

        if (this.log.isDebugEnabled()) {
            this.log.debug("[exchange: " + state.getId() + "] produce content");
        }
        final HttpAsyncRequestProducer requestProducer = state.getRequestProducer();
        state.setRequestContentProduced();
        requestProducer.produceContent(encoder, ioctrl);
        if (encoder.isCompleted()) {
            requestProducer.resetRequest();
        }
    }
View Full Code Here

Examples of org.apache.http.nio.protocol.HttpAsyncRequestProducer.produceContent()

        if (this.log.isDebugEnabled()) {
            this.log.debug("[exchange: " + state.getId() + "] produce content");
        }
        final HttpAsyncRequestProducer requestProducer = state.getRequestProducer();
        state.setRequestContentProduced();
        requestProducer.produceContent(encoder, ioctrl);
        if (encoder.isCompleted()) {
            requestProducer.resetRequest();
        }
    }
View Full Code Here

Examples of org.apache.http.nio.protocol.HttpAsyncRequestProducer.produceContent()

        if (this.log.isDebugEnabled()) {
            this.log.debug("[exchange: " + state.getId() + "] produce content");
        }
        final HttpAsyncRequestProducer requestProducer = state.getRequestProducer();
        state.setRequestContentProduced();
        requestProducer.produceContent(encoder, ioctrl);
        if (encoder.isCompleted()) {
            requestProducer.resetRequest();
        }
    }
View Full Code Here

Examples of org.apache.http.nio.util.ContentOutputBuffer.produceContent()

        ContentOutputBuffer outBuf
                = (ContentOutputBuffer) context.getAttribute(REQUEST_SOURCE_BUFFER);
        if (outBuf == null) return;

        try {
            int bytesWritten = outBuf.produceContent(encoder);
            if (metrics != null) {
                if (bytesWritten > 0) {
                    if (metrics.getLevel() == MetricsCollector.LEVEL_FULL) {
                        metrics.incrementBytesSent(getMessageContext(conn), bytesWritten);
                    } else {
View Full Code Here

Examples of org.apache.http.nio.util.ContentOutputBuffer.produceContent()

        ContentOutputBuffer outBuf
                = (ContentOutputBuffer) context.getAttribute(REQUEST_SOURCE_BUFFER);
        if (outBuf == null) return;

        try {
            int bytesWritten = outBuf.produceContent(encoder);
            if (metrics != null) {
                if (bytesWritten > 0) {
                    if (metrics.getLevel() == MetricsCollector.LEVEL_FULL) {
                        metrics.incrementBytesSent(getMessageContext(conn), bytesWritten);
                    } else {
View Full Code Here

Examples of org.apache.http.nio.util.ContentOutputBuffer.produceContent()

            shutdownConnection(conn);
            return;
        }

        try {
            int bytesWritten = outBuf.produceContent(encoder);
            if (metrics != null && bytesWritten > 0) {
                metrics.incrementBytesSent(bytesWritten);
            }

            if (encoder.isCompleted()) {
View Full Code Here

Examples of org.apache.http.nio.util.ContentOutputBuffer.produceContent()

                if (connState.getOutputState() == ClientConnState.EXPECT_CONTINUE) {
                    conn.suspendOutput();
                    return;
                }
                ContentOutputBuffer buffer = connState.getOutbuffer();
                buffer.produceContent(encoder);
                if (encoder.isCompleted()) {
                    connState.setInputState(ClientConnState.REQUEST_BODY_DONE);
                } else {
                    connState.setInputState(ClientConnState.REQUEST_BODY_STREAM);
                }
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.