- All Superinterfaces:
ServerResponse
- All Known Implementing Classes:
ServerResponseBase
Routing response of a server.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
commit()
Commit the response.boolean
Whether this request has an entity.boolean
isNexted()
Whether this request is nexted (ServerResponse.next()
was called).reroutePrologue
(HttpPrologue prologue) A new, rerouted prologue.boolean
reset()
Return true if the underlying response buffers and headers can be reset and a new response can be sent.void
Reset routing information (nexted, rerouted etc.).boolean
Should we reroute this exchange.Methods inherited from interface io.helidon.webserver.http.ServerResponse
bytesWritten, contentLength, header, header, header, headers, isSent, next, outputStream, reroute, reroute, send, send, send, send, send, sink, status, status, status, streamFilter, streamResult, trailers, whenSent
-
Method Details
-
resetRouting
void resetRouting()Reset routing information (nexted, rerouted etc.). -
shouldReroute
boolean shouldReroute()Should we reroute this exchange.- Returns:
- whether rerouting was requested
-
reroutePrologue
A new, rerouted prologue.- Parameters:
prologue
- current prologue- Returns:
- prologue to use when rerouting
-
isNexted
boolean isNexted()Whether this request is nexted (ServerResponse.next()
was called).- Returns:
- if nexted
-
hasEntity
boolean hasEntity()Whether this request has an entity.- Returns:
- whether has entity
-
reset
boolean reset()Return true if the underlying response buffers and headers can be reset and a new response can be sent.- Returns:
true
if reset was successful and a new response can be created instead of the existing one,false
if reset failed and status and headers (and maybe entity bytes) were already sent
-
commit
void commit()Commit the response. This is mostly useful for output stream based responses, where we may want to delay closing the output stream to handle errors, when route uses try with resources. After this method is called, response cannot bereset()
.
-