Top Description Fields Constructors Methods
org.apache.hc.core5.http.impl.nio

public Class ClientHttp1StreamDuplexer

extends AbstractHttp1StreamDuplexer<HttpResponse, HttpRequest>
Class Inheritance
Annotations
@Internal
Imports
java.io.IOException, java.nio.ByteBuffer, java.nio.channels.ReadableByteChannel, .WritableByteChannel, java.util.List, .Queue, java.util.concurrent.ConcurrentLinkedQueue, org.apache.hc.core5.annotation.Internal, org.apache.hc.core5.http.ConnectionClosedException, .ConnectionReuseStrategy, .ContentLengthStrategy, .EntityDetails, .Header, .HttpException, .HttpRequest, .HttpResponse, .HttpStatus, .LengthRequiredException, org.apache.hc.core5.http.config.CharCodingConfig, .Http1Config, org.apache.hc.core5.http.impl.BasicHttpConnectionMetrics, .BasicHttpTransportMetrics, .DefaultConnectionReuseStrategy, .Http1StreamListener, org.apache.hc.core5.http.message.MessageSupport, org.apache.hc.core5.http.nio.AsyncClientExchangeHandler, .CapacityChannel, .ContentDecoder, .ContentEncoder, .NHttpMessageParser, .NHttpMessageWriter, .SessionInputBuffer, .SessionOutputBuffer, org.apache.hc.core5.http.nio.command.RequestExecutionCommand, org.apache.hc.core5.http.protocol.HttpCoreContext, .HttpProcessor, org.apache.hc.core5.io.CloseMode, org.apache.hc.core5.reactor.ProtocolIOSession, org.apache.hc.core5.util.Args, .Asserts, .Timeout

I/O event handler for events fired by ProtocolIOSession that implements client side HTTP/1.1 messaging protocol with full support for duplexed message transmission and message pipelining.
Since
5.0

Field Summary

Modifier and TypeField and Description
private final ConnectionReuseStrategy
private final Http1Config
private final HttpProcessor
private volatile ClientHttp1StreamHandler
private volatile ClientHttp1StreamHandler
private final Http1StreamChannel<HttpRequest>
private final Queue<ClientHttp1StreamHandler>
private final Http1StreamListener

Constructor Summary

AccessConstructor and Description
public
ClientHttp1StreamDuplexer(final ProtocolIOSession ioSession, final HttpProcessor httpProcessor, final Http1Config http1Config, final CharCodingConfig charCodingConfig, final ConnectionReuseStrategy connectionReuseStrategy, final NHttpMessageParser<HttpResponse> incomingMessageParser, final NHttpMessageWriter<HttpRequest> outgoingMessageWriter, final ContentLengthStrategy incomingContentStrategy, final ContentLengthStrategy outgoingContentStrategy, final Http1StreamListener streamListener)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv void
pack-priv void
protected ContentDecoder
protected ContentEncoder
pack-priv void
pack-priv void
pack-priv void
protected boolean
protected boolean
pack-priv boolean
pack-priv void
pack-priv boolean
pack-priv boolean
pack-priv void
pack-priv boolean
pack-priv void
pack-priv void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
pack-priv void
pack-priv void
pack-priv void
Inherited from org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer:
closeclosecommitMessageHeadendOutputStreamgetEndpointDetailsgetIdgetLocalAddressgetProtocolVersiongetRemoteAddressgetSessionTimeoutgetSocketTimeoutgetSSLSessionisActiveisOpenisOutputCompletedisShuttingDownonConnectonDisconnectonExceptiononInputonOutputonTimeoutparseMessageHeadrequestSessionInputrequestSessionOutputrequestShutdownsetSessionTimeoutsetSocketTimeoutshutdownSessionshutdownSessionstreamOutputsuspendSessionInputsuspendSessionOutput

Field Detail

connectionReuseStrategyback to summary
private final ConnectionReuseStrategy connectionReuseStrategy
http1Configback to summary
private final Http1Config http1Config

Hides org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.http1Config.

httpProcessorback to summary
private final HttpProcessor httpProcessor
incomingback to summary
private volatile ClientHttp1StreamHandler incoming
outgoingback to summary
private volatile ClientHttp1StreamHandler outgoing
outputChannelback to summary
private final Http1StreamChannel<HttpRequest> outputChannel
pipelineback to summary
private final Queue<ClientHttp1StreamHandler> pipeline
streamListenerback to summary
private final Http1StreamListener streamListener

Constructor Detail

ClientHttp1StreamDuplexerback to summary
public ClientHttp1StreamDuplexer(final ProtocolIOSession ioSession, final HttpProcessor httpProcessor, final Http1Config http1Config, final CharCodingConfig charCodingConfig, final ConnectionReuseStrategy connectionReuseStrategy, final NHttpMessageParser<HttpResponse> incomingMessageParser, final NHttpMessageWriter<HttpRequest> outgoingMessageWriter, final ContentLengthStrategy incomingContentStrategy, final ContentLengthStrategy outgoingContentStrategy, final Http1StreamListener streamListener)

Method Detail

appendStateback to summary
pack-priv void appendState(final StringBuilder buf)

Overrides org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.appendState.

Annotations
@Override
consumeDataback to summary
pack-priv void consumeData(final ByteBuffer src) throws HttpException, IOException

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.consumeData.

Annotations
@Override
consumeHeaderback to summary
pack-priv void consumeHeader(final HttpResponse response, final EntityDetails entityDetails) throws HttpException, IOException

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.consumeHeader.

Annotations
@Override
createContentDecoderback to summary
protected ContentDecoder createContentDecoder(final long len, final ReadableByteChannel channel, final SessionInputBuffer buffer, final BasicHttpTransportMetrics metrics) throws HttpException

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.createContentDecoder.

Annotations
@Override
createContentEncoderback to summary
protected ContentEncoder createContentEncoder(final long len, final WritableByteChannel channel, final SessionOutputBuffer buffer, final BasicHttpTransportMetrics metrics) throws HttpException

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.createContentEncoder.

Annotations
@Override
dataEndback to summary
pack-priv void dataEnd(final List<? extends Header> trailers) throws HttpException, IOException

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.dataEnd.

Annotations
@Override
disconnectedback to summary
pack-priv void disconnected()

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.disconnected.

Annotations
@Override
executeback to summary
pack-priv void execute(final RequestExecutionCommand executionCommand) throws HttpException, IOException

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.execute.

Annotations
@Override
handleIncomingMessageback to summary
protected boolean handleIncomingMessage(final HttpResponse response) throws HttpException

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.handleIncomingMessage.

Annotations
@Override
handleOutgoingMessageback to summary
protected boolean handleOutgoingMessage(final HttpRequest request) throws HttpException

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.handleOutgoingMessage.

Annotations
@Override
handleTimeoutback to summary
pack-priv boolean handleTimeout()

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.handleTimeout.

Annotations
@Override
inputEndback to summary
pack-priv void inputEnd() throws HttpException, IOException

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.inputEnd.

Annotations
@Override
inputIdleback to summary
pack-priv boolean inputIdle()

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.inputIdle.

Annotations
@Override
isOutputReadyback to summary
pack-priv boolean isOutputReady()

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.isOutputReady.

Annotations
@Override
outputEndback to summary
pack-priv void outputEnd() throws HttpException, IOException

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.outputEnd.

Annotations
@Override
outputIdleback to summary
pack-priv boolean outputIdle()

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.outputIdle.

Annotations
@Override
produceOutputback to summary
pack-priv void produceOutput() throws HttpException, IOException

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.produceOutput.

Annotations
@Override
terminateback to summary
pack-priv void terminate(final Exception exception)

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.terminate.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
updateCapacityback to summary
pack-priv void updateCapacity(final CapacityChannel capacityChannel) throws HttpException, IOException

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.updateCapacity.

Annotations
@Override
updateInputMetricsback to summary
pack-priv void updateInputMetrics(final HttpResponse response, final BasicHttpConnectionMetrics connMetrics)

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.updateInputMetrics.

Annotations
@Override
updateOutputMetricsback to summary
pack-priv void updateOutputMetrics(final HttpRequest request, final BasicHttpConnectionMetrics connMetrics)

Implements abstract org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.updateOutputMetrics.

Annotations
@Override