Class ServerHttp1StreamDuplexer.DelayedOutputChannel
java.lang.Object
org.apache.hc.core5.http.impl.nio.ServerHttp1StreamDuplexer.DelayedOutputChannel
- All Implemented Interfaces:
Http1StreamChannel<HttpResponse>,ContentEncoder
- Enclosing class:
ServerHttp1StreamDuplexer
private static class ServerHttp1StreamDuplexer.DelayedOutputChannel
extends Object
implements Http1StreamChannel<HttpResponse>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Http1StreamChannel<HttpResponse> private booleanprivate HttpResponseprivate boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidactivate()voidclose()voidTerminates the content stream.booleanReturnstrueif the entity has been transferred in its entirety.voidvoidsetSocketTimeout(Timeout timeout) voidsubmit(HttpResponse response, boolean endStream, FlushMode flushMode) voidintwrite(ByteBuffer src) Writes a portion of entity content to the underlying channel.
-
Field Details
-
channel
-
direct
private volatile boolean direct -
delayedResponse
-
completed
private volatile boolean completed
-
-
Constructor Details
-
DelayedOutputChannel
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceHttp1StreamChannel<HttpResponse>
-
submit
public void submit(HttpResponse response, boolean endStream, FlushMode flushMode) throws HttpException, IOException - Specified by:
submitin interfaceHttp1StreamChannel<HttpResponse>- Throws:
HttpExceptionIOException
-
suspendOutput
- Specified by:
suspendOutputin interfaceHttp1StreamChannel<HttpResponse>- Throws:
IOException
-
requestOutput
public void requestOutput()- Specified by:
requestOutputin interfaceHttp1StreamChannel<HttpResponse>
-
getSocketTimeout
- Specified by:
getSocketTimeoutin interfaceHttp1StreamChannel<HttpResponse>
-
setSocketTimeout
- Specified by:
setSocketTimeoutin interfaceHttp1StreamChannel<HttpResponse>
-
write
Description copied from interface:ContentEncoderWrites a portion of entity content to the underlying channel.- Specified by:
writein interfaceContentEncoder- Parameters:
src- The buffer from which content is to be retrieved- Returns:
- The number of bytes read, possibly zero
- Throws:
IOException- if I/O error occurs while writing content
-
complete
Description copied from interface:ContentEncoderTerminates the content stream.- Specified by:
completein interfaceContentEncoder- Throws:
IOException- if I/O error occurs while writing content
-
abortGracefully
- Specified by:
abortGracefullyin interfaceHttp1StreamChannel<HttpResponse>- Throws:
IOException
-
isCompleted
public boolean isCompleted()Description copied from interface:ContentEncoderReturnstrueif the entity has been transferred in its entirety.- Specified by:
isCompletedin interfaceContentEncoder- Returns:
trueif all the content has been produced,falseotherwise.
-
activate
- Specified by:
activatein interfaceHttp1StreamChannel<HttpResponse>- Throws:
IOExceptionHttpException
-