类 UndertowServerHttpResponse
java.lang.Object
cn.taketoday.http.server.reactive.AbstractServerHttpResponse
cn.taketoday.http.server.reactive.AbstractListenerServerHttpResponse
cn.taketoday.http.server.reactive.UndertowServerHttpResponse
class UndertowServerHttpResponse
extends AbstractListenerServerHttpResponse
implements ZeroCopyHttpOutputMessage
Adapt
ServerHttpResponse to the Undertow HttpServerExchange.- 从以下版本开始:
- 4.0
- 作者:
- Marek Hawrylczak, Rossen Stoyanchev, Arjen Poutsma, Harry Yang
-
嵌套类概要
嵌套类修饰符和类型类说明private classprivate classprivate static class -
字段概要
字段修饰符和类型字段说明private final io.undertow.server.HttpServerExchangeprivate final UndertowServerHttpRequestprivate org.xnio.channels.StreamSinkChannel -
构造器概要
构造器构造器说明UndertowServerHttpResponse(io.undertow.server.HttpServerExchange exchange, cn.taketoday.core.io.buffer.DataBufferFactory bufferFactory, UndertowServerHttpRequest request) -
方法概要
修饰符和类型方法说明protected voidAdd cookies fromAbstractServerHttpResponse.getHeaders()to the underlying response.protected voidInvoked when the response is getting committed allowing sub-classes to make apply header values to the underlying response.protected voidWrite the status code to the underlying response.protected org.reactivestreams.Processor<? super org.reactivestreams.Publisher<? extends cn.taketoday.core.io.buffer.DataBuffer>,Void> Abstract template method to create aProcessor<Publisher<DataBuffer>, Void>that will write the response body with flushes to the underlying output.private static HttpHeaderscreateHeaders(io.undertow.server.HttpServerExchange exchange) <T> TReturn the underlying server response.Return the status code that has been set, or otherwise fall back on the status of the response from the underlying server.Return the status code that has been set, or otherwise fall back on the status of the response from the underlying server.reactor.core.publisher.Mono<Void>Use the givenPathto write the body of the message to the underlying HTTP layer.从类继承的方法 cn.taketoday.http.server.reactive.AbstractListenerServerHttpResponse
writeAndFlushWithInternal, writeWithInternal从类继承的方法 cn.taketoday.http.server.reactive.AbstractServerHttpResponse
addCookie, beforeCommit, bufferFactory, doCommit, doCommit, getCookies, getHeaders, isCommitted, setComplete, setRawStatusCode, setStatusCode, touchDataBuffer, writeAndFlushWith, writeWith从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.http.HttpMessage
getHeaders从接口继承的方法 cn.taketoday.http.ReactiveHttpOutputMessage
beforeCommit, bufferFactory, isCommitted, setComplete, writeAndFlushWith, writeWith从接口继承的方法 cn.taketoday.http.ZeroCopyHttpOutputMessage
writeWith
-
字段详细资料
-
responseChannel
@Nullable private org.xnio.channels.StreamSinkChannel responseChannel -
exchange
private final io.undertow.server.HttpServerExchange exchange -
request
-
-
构造器详细资料
-
UndertowServerHttpResponse
UndertowServerHttpResponse(io.undertow.server.HttpServerExchange exchange, cn.taketoday.core.io.buffer.DataBufferFactory bufferFactory, UndertowServerHttpRequest request)
-
-
方法详细资料
-
createHeaders
-
getNativeResponse
public <T> T getNativeResponse()从类复制的说明:AbstractServerHttpResponseReturn the underlying server response. -
getStatusCode
从接口复制的说明:ServerHttpResponseReturn the status code that has been set, or otherwise fall back on the status of the response from the underlying server. The return value may benullif the status code value is outside theHttpStatusenum range, or if there is no default value from the underlying server.- 指定者:
getStatusCode在接口中ServerHttpResponse- 覆盖:
getStatusCode在类中AbstractServerHttpResponse
-
getRawStatusCode
从接口复制的说明:ServerHttpResponseReturn the status code that has been set, or otherwise fall back on the status of the response from the underlying server. The return value may benullif there is no default value from the underlying server.- 指定者:
getRawStatusCode在接口中ServerHttpResponse- 覆盖:
getRawStatusCode在类中AbstractServerHttpResponse
-
applyStatusCode
protected void applyStatusCode()从类复制的说明:AbstractServerHttpResponseWrite the status code to the underlying response. This method is called once only. -
applyHeaders
protected void applyHeaders()从类复制的说明:AbstractServerHttpResponseInvoked when the response is getting committed allowing sub-classes to make apply header values to the underlying response.Note that most sub-classes use an
HttpHeadersinstance that wraps an adapter to the native response headers such that changes are propagated to the underlying response on the go. That means this callback is typically not used other than for specialized updates such as setting the contentType or characterEncoding fields in a Servlet response.- 指定者:
applyHeaders在类中AbstractServerHttpResponse
-
applyCookies
protected void applyCookies()从类复制的说明:AbstractServerHttpResponseAdd cookies fromAbstractServerHttpResponse.getHeaders()to the underlying response. This method is called once only.- 指定者:
applyCookies在类中AbstractServerHttpResponse
-
writeWith
从接口复制的说明:ZeroCopyHttpOutputMessageUse the givenPathto write the body of the message to the underlying HTTP layer.- 指定者:
writeWith在接口中ZeroCopyHttpOutputMessage- 参数:
file- the file to transferposition- the position within the file from which the transfer is to begincount- the number of bytes to be transferred- 返回:
- a publisher that indicates completion or error.
-
createBodyFlushProcessor
protected org.reactivestreams.Processor<? super org.reactivestreams.Publisher<? extends cn.taketoday.core.io.buffer.DataBuffer>,Void> createBodyFlushProcessor()从类复制的说明:AbstractListenerServerHttpResponseAbstract template method to create aProcessor<Publisher<DataBuffer>, Void>that will write the response body with flushes to the underlying output. Called fromAbstractListenerServerHttpResponse.writeAndFlushWithInternal(Publisher). -
createBodyProcessor
-