Package com.linecorp.armeria.common
Interface HttpResponseWriter
-
- All Superinterfaces:
HttpResponse
,org.reactivestreams.Publisher<HttpObject>
,Response
,StreamMessage<HttpObject>
,StreamWriter<HttpObject>
- All Known Implementing Classes:
DefaultHttpResponse
public interface HttpResponseWriter extends HttpResponse, StreamWriter<HttpObject>
AnHttpResponse
that can haveHttpObject
s written to it.
-
-
Method Summary
Modifier and Type Method Description default void
close(AggregatedHttpResponse res)
Writes the specified HTTP response and closes the stream.default void
respond(int statusCode)
Deprecated.UseHttpResponse.of(int)
.default void
respond(HttpStatus status)
Deprecated.default void
respond(HttpStatus status, MediaType mediaType, byte[] content)
Deprecated.default void
respond(HttpStatus status, MediaType mediaType, HttpData content)
Deprecated.default void
respond(HttpStatus status, MediaType mediaType, HttpData content, HttpHeaders trailers)
Deprecated.default void
respond(HttpStatus status, MediaType mediaType, String content)
Deprecated.default void
respond(HttpStatus status, MediaType mediaType, String format, Object... args)
Deprecated.-
Methods inherited from interface com.linecorp.armeria.common.HttpResponse
aggregate, aggregate, aggregateWithPooledObjects, aggregateWithPooledObjects, closeFuture, completionFuture
-
-
-
-
Method Detail
-
respond
@Deprecated default void respond(int statusCode)
Deprecated.UseHttpResponse.of(int)
.Writes the HTTP response of the specifiedstatusCode
and closes the stream if theHttpStatusClass
is not informational (1xx).
-
respond
@Deprecated default void respond(HttpStatus status)
Deprecated.Writes the HTTP response of the specifiedHttpStatus
and closes the stream if theHttpStatusClass
is not informational (1xx).
-
respond
@Deprecated default void respond(HttpStatus status, MediaType mediaType, String content)
Deprecated.Writes the HTTP response of the specifiedHttpStatus
and closes the stream.- Parameters:
mediaType
- theMediaType
of the response contentcontent
- the content of the response
-
respond
@Deprecated default void respond(HttpStatus status, MediaType mediaType, String format, Object... args)
Deprecated.Writes the HTTP response of the specifiedHttpStatus
and closes the stream. The content of the response is formatted byString.format(Locale, String, Object...)
with English locale.- Parameters:
mediaType
- theMediaType
of the response contentformat
- the format string of the response contentargs
- the arguments referenced by the format specifiers in the format string
-
respond
@Deprecated default void respond(HttpStatus status, MediaType mediaType, byte[] content)
Deprecated.Writes the HTTP response of the specifiedHttpStatus
and closes the stream.- Parameters:
mediaType
- theMediaType
of the response contentcontent
- the content of the response
-
respond
@Deprecated default void respond(HttpStatus status, MediaType mediaType, HttpData content)
Deprecated.Writes the HTTP response of the specifiedHttpStatus
and closes the stream.- Parameters:
mediaType
- theMediaType
of the response contentcontent
- the content of the response
-
respond
@Deprecated default void respond(HttpStatus status, MediaType mediaType, HttpData content, HttpHeaders trailers)
Deprecated.Writes the HTTP response of the specifiedHttpStatus
and closes the stream.- Parameters:
mediaType
- theMediaType
of the response contentcontent
- the content of the responsetrailers
- the HTTP trailers
-
close
default void close(AggregatedHttpResponse res)
Writes the specified HTTP response and closes the stream.
-
-