T
- the type of objects to writepublic interface HttpPayloadWriter<T> extends PayloadWriter<T>
OutputStream
, but allows for writing of objects of type
T
and provides access to the HTTP trailers.Modifier and Type | Method and Description |
---|---|
default HttpPayloadWriter<T> |
addTrailer(java.lang.CharSequence name,
java.lang.CharSequence value)
Adds a new trailer with the specified
name and value . |
default HttpPayloadWriter<T> |
addTrailers(HttpHeaders trailers)
Adds all trailer names and values of
trailer object. |
default HttpPayloadWriter<T> |
setTrailer(java.lang.CharSequence name,
java.lang.CharSequence value)
Sets a trailer with the specified
name and value . |
default HttpPayloadWriter<T> |
setTrailers(HttpHeaders trailers)
Clears the current trailer entries and copies all trailer entries of the specified
trailers object. |
HttpHeaders |
trailers()
Gets the trailers.
|
write
default HttpPayloadWriter<T> addTrailer(java.lang.CharSequence name, java.lang.CharSequence value)
name
and value
.name
- the name of the trailer.value
- the value of the trailer.this
.default HttpPayloadWriter<T> addTrailers(HttpHeaders trailers)
trailer
object.trailers
- the trailers to add.this
.default HttpPayloadWriter<T> setTrailer(java.lang.CharSequence name, java.lang.CharSequence value)
name
and value
. Any existing trailers with the same name are
overwritten.name
- the name of the trailer.value
- the value of the trailer.this
.default HttpPayloadWriter<T> setTrailers(HttpHeaders trailers)
trailers
object.trailers
- the trailers object which contains new values.this
.HttpHeaders trailers()