Class ServerHttp1StreamHandler
java.lang.Object
org.apache.hc.core5.http.impl.nio.ServerHttp1StreamHandler
- All Implemented Interfaces:
ResourceHolder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConnectionReuseStrategy
private final HttpCoreContext
private final AtomicBoolean
private AsyncServerExchangeHandler
private final HandlerFactory
<AsyncServerExchangeHandler> private final HttpProcessor
private final DataStreamChannel
private boolean
private final Http1StreamChannel
<HttpResponse> private HttpRequest
private MessageState
private final ResponseChannel
private final AtomicBoolean
private MessageState
-
Constructor Summary
ConstructorsConstructorDescriptionServerHttp1StreamHandler
(Http1StreamChannel<HttpResponse> outputChannel, HttpProcessor httpProcessor, ConnectionReuseStrategy connectionReuseStrategy, HandlerFactory<AsyncServerExchangeHandler> exchangeHandlerFactory, HttpCoreContext context) -
Method Summary
Modifier and TypeMethodDescription(package private) void
(package private) void
appendState
(StringBuilder buf) private void
commitInformation
(HttpResponse response) private void
private void
commitResponse
(HttpResponse response, EntityDetails responseEntityDetails) (package private) void
consumeData
(ByteBuffer src) (package private) void
consumeHeader
(HttpRequest request, EntityDetails requestEntityDetails) (package private) void
(package private) void
(package private) boolean
(package private) boolean
(package private) boolean
(package private) boolean
(package private) void
void
(package private) void
toString()
(package private) void
updateCapacity
(CapacityChannel capacityChannel)
-
Field Details
-
outputChannel
-
internalDataChannel
-
responseChannel
-
httpProcessor
-
exchangeHandlerFactory
-
connectionReuseStrategy
-
context
-
responseCommitted
-
done
-
keepAlive
private volatile boolean keepAlive -
exchangeHandler
-
receivedRequest
-
requestState
-
responseState
-
-
Constructor Details
-
ServerHttp1StreamHandler
ServerHttp1StreamHandler(Http1StreamChannel<HttpResponse> outputChannel, HttpProcessor httpProcessor, ConnectionReuseStrategy connectionReuseStrategy, HandlerFactory<AsyncServerExchangeHandler> exchangeHandlerFactory, HttpCoreContext context)
-
-
Method Details
-
commitResponse
private void commitResponse(HttpResponse response, EntityDetails responseEntityDetails) throws HttpException, IOException - Throws:
HttpException
IOException
-
commitInformation
- Throws:
IOException
HttpException
-
commitPromise
- Throws:
HttpException
-
activateChannel
- Throws:
IOException
HttpException
-
isResponseFinal
boolean isResponseFinal() -
keepAlive
boolean keepAlive() -
isCompleted
boolean isCompleted() -
terminateExchange
- Throws:
HttpException
IOException
-
consumeHeader
void consumeHeader(HttpRequest request, EntityDetails requestEntityDetails) throws HttpException, IOException - Throws:
HttpException
IOException
-
isOutputReady
boolean isOutputReady() -
produceOutput
- Throws:
HttpException
IOException
-
consumeData
- Throws:
HttpException
IOException
-
updateCapacity
- Throws:
IOException
-
dataEnd
- Throws:
HttpException
IOException
-
failed
-
releaseResources
public void releaseResources()- Specified by:
releaseResources
in interfaceResourceHolder
-
appendState
-
toString
-