public interface HttpResponseWriter extends HttpResponse, StreamWriter<HttpObject>
HttpResponse that can have HttpObjects written to it.| Modifier and Type | Method and Description |
|---|---|
default void |
close(AggregatedHttpResponse res)
Writes the specified HTTP response and closes the stream.
|
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.
|
default void |
respond(int statusCode)
Deprecated.
Use
HttpResponse.of(int). |
aggregate, aggregate, aggregateWithPooledObjects, aggregateWithPooledObjects, closeFuture, completionFuture, delayed, delayed, delayed, delayed, from, from, of, of, of, of, of, of, of, of, of, of, of, of, of, of, of, of, of, of, ofFailed, ofFailure, streaming, toDuplicator, toDuplicator, toDuplicator, toDuplicator, whenComplete@Deprecated default void respond(int statusCode)
HttpResponse.of(int).statusCode and closes the stream if the
HttpStatusClass is not informational (1xx).@Deprecated default void respond(HttpStatus status)
HttpResponse.of(HttpStatus).HttpStatus and closes the stream if the
HttpStatusClass is not informational (1xx).@Deprecated default void respond(HttpStatus status, MediaType mediaType, String content)
HttpResponse.of(HttpStatus, MediaType, String).HttpStatus and closes the stream.mediaType - the MediaType of the response contentcontent - the content of the response@Deprecated default void respond(HttpStatus status, MediaType mediaType, String format, Object... args)
HttpResponse.of(HttpStatus, MediaType, String, Object...).HttpStatus and closes the stream.
The content of the response is formatted by String.format(Locale, String, Object...) with
English locale.mediaType - the MediaType of the response contentformat - the format string of the response contentargs - the arguments referenced by the format specifiers in the format string@Deprecated default void respond(HttpStatus status, MediaType mediaType, byte[] content)
HttpResponse.of(HttpStatus, MediaType, byte[]).HttpStatus and closes the stream.mediaType - the MediaType of the response contentcontent - the content of the response@Deprecated default void respond(HttpStatus status, MediaType mediaType, HttpData content)
HttpResponse.of(HttpStatus, MediaType, HttpData).HttpStatus and closes the stream.mediaType - the MediaType of the response contentcontent - the content of the response@Deprecated default void respond(HttpStatus status, MediaType mediaType, HttpData content, HttpHeaders trailers)
HttpResponse.of(HttpStatus, MediaType, HttpData, HttpHeaders).HttpStatus and closes the stream.mediaType - the MediaType of the response contentcontent - the content of the responsetrailers - the HTTP trailersdefault void close(AggregatedHttpResponse res)
Copyright © 2020 LeanCloud. All rights reserved.