public interface HttpResponseWriter extends StreamWriter<HttpObject>
StreamWriter
of an HttpResponse
.Modifier and Type | Method and Description |
---|---|
default void |
respond(AggregatedHttpMessage res)
Writes the specified HTTP response and closes the stream.
|
default void |
respond(HttpStatus status)
Writes the HTTP response of the specified
HttpStatus and closes the stream if the
HttpStatusClass is not informational (1xx). |
default void |
respond(HttpStatus status,
MediaType mediaType,
byte[] content)
Writes the HTTP response of the specified
HttpStatus and closes the stream. |
default void |
respond(HttpStatus status,
MediaType mediaType,
byte[] content,
int offset,
int length)
Writes the HTTP response of the specified
HttpStatus and closes the stream. |
default void |
respond(HttpStatus status,
MediaType mediaType,
HttpData content)
Writes the HTTP response of the specified
HttpStatus and closes the stream. |
default void |
respond(HttpStatus status,
MediaType mediaType,
HttpData content,
HttpHeaders trailingHeaders)
Writes the HTTP response of the specified
HttpStatus and closes the stream. |
default void |
respond(HttpStatus status,
MediaType mediaType,
String content)
Writes the HTTP response of the specified
HttpStatus and closes the stream. |
default void |
respond(HttpStatus status,
MediaType mediaType,
String format,
Object... args)
Writes the HTTP response of the specified
HttpStatus and closes the stream. |
default void |
respond(int statusCode)
Writes the HTTP response of the specified
statusCode and closes the stream if the
HttpStatusClass is not informational (1xx). |
default void respond(int statusCode)
statusCode
and closes the stream if the
HttpStatusClass
is not informational (1xx).default void respond(HttpStatus status)
HttpStatus
and closes the stream if the
HttpStatusClass
is not informational (1xx).default void respond(HttpStatus status, MediaType mediaType, String content)
HttpStatus
and closes the stream.mediaType
- the MediaType
of the response contentcontent
- the content of the responsedefault void respond(HttpStatus status, MediaType mediaType, String format, Object... args)
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 stringdefault void respond(HttpStatus status, MediaType mediaType, byte[] content)
HttpStatus
and closes the stream.mediaType
- the MediaType
of the response contentcontent
- the content of the responsedefault void respond(HttpStatus status, MediaType mediaType, byte[] content, int offset, int length)
HttpStatus
and closes the stream.mediaType
- the MediaType
of the response contentcontent
- the content of the responseoffset
- the start offset of content
length
- the length of content
default void respond(HttpStatus status, MediaType mediaType, HttpData content)
HttpStatus
and closes the stream.mediaType
- the MediaType
of the response contentcontent
- the content of the responsedefault void respond(HttpStatus status, MediaType mediaType, HttpData content, HttpHeaders trailingHeaders)
HttpStatus
and closes the stream.mediaType
- the MediaType
of the response contentcontent
- the content of the responsetrailingHeaders
- the trailing HTTP headersdefault void respond(AggregatedHttpMessage res)
© Copyright 2015–2017 LINE Corporation. All rights reserved.