public class OperationResponseFactory extends Object
OperationResponses.| Constructor and Description |
|---|
OperationResponseFactory() |
| Modifier and Type | Method and Description |
|---|---|
OperationResponse |
create(HttpStatus status,
HttpHeaders headers,
byte[] content)
Deprecated.
since 2.0.4 in favor of
create(int, HttpHeaders, byte[]) |
OperationResponse |
create(int status,
HttpHeaders headers,
byte[] content) |
OperationResponse |
createFrom(OperationResponse original,
byte[] newContent)
Creates a new
OperationResponse based on the given original but
with the given newContent. |
OperationResponse |
createFrom(OperationResponse original,
HttpHeaders newHeaders)
Creates a new
OperationResponse based on the given original but
with the given newHeaders. |
@Deprecated public OperationResponse create(HttpStatus status, HttpHeaders headers, byte[] content)
create(int, HttpHeaders, byte[])OperationResponse. If the response has any content, the given
headers will be augmented to ensure that they include a
Content-Length header.status - the status of the responseheaders - the request's headerscontent - the content of the requestOperationResponsepublic OperationResponse create(int status, HttpHeaders headers, byte[] content)
public OperationResponse createFrom(OperationResponse original, byte[] newContent)
OperationResponse based on the given original but
with the given newContent. If the original response had a
Content-Length header it will be modified to match the length of the new
content.original - the original responsenewContent - the new contentpublic OperationResponse createFrom(OperationResponse original, HttpHeaders newHeaders)
OperationResponse based on the given original but
with the given newHeaders.original - the original responsenewHeaders - the new headers