Package com.opencloud.slee.rest.common
Interface RestResponseBuilder
-
public interface RestResponseBuilder
Represent a REST response being constructed.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RestResponse
build(IncomingRestActivity activity)
java.lang.String
getApi()
java.lang.String
getOperationId()
RestResponseBuilder
setContent(java.lang.String contentType, java.lang.Object content, byte[] encodedContent)
Set the content of the rest response.RestResponseBuilder
setHeader(java.lang.String name, java.lang.String value)
Set a header in the response.RestResponseBuilder
setStatus(int status)
Set the response statusRestResponseBuilder
setStatus(int status, java.lang.String reason)
Set the response status and reason
-
-
-
Method Detail
-
setStatus
RestResponseBuilder setStatus(int status)
Set the response status- Parameters:
status
- the status- Returns:
- this rest response builder
-
setStatus
RestResponseBuilder setStatus(int status, java.lang.String reason)
Set the response status and reason- Parameters:
status
- the statusreason
- the reason- Returns:
- this rest response builder
-
setContent
RestResponseBuilder setContent(java.lang.String contentType, java.lang.Object content, byte[] encodedContent)
Set the content of the rest response.- Parameters:
contentType
- the content type to be usedcontent
- the object that represents the content. This is used in tracing.encodedContent
- the content, encoded as a byte[], according to the contentType- Returns:
- this rest response builder
-
setHeader
RestResponseBuilder setHeader(java.lang.String name, java.lang.String value)
Set a header in the response.- Parameters:
name
- the header namevalue
- the header value, may not be null- Returns:
- this rest response builder
-
getApi
java.lang.String getApi()
- Returns:
- the associated API for this rest response
-
getOperationId
java.lang.String getOperationId()
- Returns:
- the associated operation-id for this rest response
-
build
RestResponse build(IncomingRestActivity activity)
-
-