Class ServerHttp1StreamHandler
java.lang.Object
org.apache.hc.core5.http.impl.nio.ServerHttp1StreamHandler
- All Implemented Interfaces:
ResourceHolder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConnectionReuseStrategyprivate final HttpCoreContextprivate final AtomicBooleanprivate AsyncServerExchangeHandlerprivate final HandlerFactory<AsyncServerExchangeHandler> private final Http1Configprivate final HttpProcessorprivate final DataStreamChannelprivate booleanprivate final Http1StreamChannel<HttpResponse> private HttpRequestprivate final AtomicReference<MessageState> private final ResponseChannelprivate final AtomicBooleanprivate final AtomicReference<MessageState> -
Constructor Summary
ConstructorsConstructorDescriptionServerHttp1StreamHandler(Http1StreamChannel<HttpResponse> outputChannel, HttpProcessor httpProcessor, Http1Config http1Config, ConnectionReuseStrategy connectionReuseStrategy, HandlerFactory<AsyncServerExchangeHandler> exchangeHandlerFactory, Callback<Exception> exceptionCallback, HttpCoreContext context) -
Method Summary
Modifier and TypeMethodDescription(package private) void(package private) voidappendState(StringBuilder buf) private voidcommitInformation(HttpResponse response) private voidprivate voidcommitResponse(HttpResponse response, EntityDetails responseEntityDetails) (package private) voidconsumeData(ByteBuffer src) (package private) voidconsumeHeader(HttpRequest request, EntityDetails requestEntityDetails) (package private) void(package private) void(package private) boolean(package private) boolean(package private) boolean(package private) boolean(package private) voidvoidprivate void(package private) voidtoString()(package private) voidupdateCapacity(CapacityChannel capacityChannel)
-
Field Details
-
outputChannel
-
internalDataChannel
-
responseChannel
-
httpProcessor
-
http1Config
-
connectionReuseStrategy
-
exchangeHandlerFactory
-
exceptionCallback
-
context
-
requestState
-
responseState
-
responseCommitted
-
done
-
keepAlive
private volatile boolean keepAlive -
exchangeHandler
-
receivedRequest
-
-
Constructor Details
-
ServerHttp1StreamHandler
ServerHttp1StreamHandler(Http1StreamChannel<HttpResponse> outputChannel, HttpProcessor httpProcessor, Http1Config http1Config, ConnectionReuseStrategy connectionReuseStrategy, HandlerFactory<AsyncServerExchangeHandler> exchangeHandlerFactory, Callback<Exception> exceptionCallback, HttpCoreContext context)
-
-
Method Details
-
commitResponse
private void commitResponse(HttpResponse response, EntityDetails responseEntityDetails) throws HttpException, IOException - Throws:
HttpExceptionIOException
-
commitInformation
- Throws:
IOExceptionHttpException
-
commitPromise
- Throws:
HttpException
-
terminate
private void terminate() -
activateChannel
- Throws:
IOExceptionHttpException
-
isResponseFinal
boolean isResponseFinal() -
keepAlive
boolean keepAlive() -
isCompleted
boolean isCompleted() -
terminateExchange
- Throws:
HttpExceptionIOException
-
consumeHeader
void consumeHeader(HttpRequest request, EntityDetails requestEntityDetails) throws HttpException, IOException - Throws:
HttpExceptionIOException
-
isOutputReady
boolean isOutputReady() -
produceOutput
- Throws:
IOException
-
consumeData
- Throws:
HttpExceptionIOException
-
updateCapacity
- Throws:
IOException
-
dataEnd
- Throws:
HttpExceptionIOException
-
failed
-
releaseResources
public void releaseResources()- Specified by:
releaseResourcesin interfaceResourceHolder
-
appendState
-
toString
-