public class OperationResponseFactory
extends java.lang.Object
OperationResponses.| Constructor and Description |
|---|
OperationResponseFactory() |
| Modifier and Type | Method and Description |
|---|---|
OperationResponse |
create(org.springframework.http.HttpStatus status,
org.springframework.http.HttpHeaders headers,
byte[] content)
Creates a new
OperationResponse. |
OperationResponse |
createFrom(OperationResponse original,
byte[] newContent)
Creates a new
OperationResponse based on the given original but
with the given newContent. |
OperationResponse |
createFrom(OperationResponse original,
org.springframework.http.HttpHeaders newHeaders)
Creates a new
OperationResponse based on the given original but
with the given newHeaders. |
public OperationResponse create(org.springframework.http.HttpStatus status, org.springframework.http.HttpHeaders headers, byte[] content)
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 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, org.springframework.http.HttpHeaders newHeaders)
OperationResponse based on the given original but
with the given newHeaders.original - The original responsenewHeaders - The new headers