Package com.opencloud.slee.rest.common
Interface RestResponseBuilder
- 
public interface RestResponseBuilderRepresent a REST response being constructed. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RestResponsebuild(IncomingRestActivity activity)java.lang.StringgetApi()java.lang.StringgetOperationId()RestResponseBuildersetContent(java.lang.String contentType, java.lang.Object content, byte[] encodedContent)Set the content of the rest response.RestResponseBuildersetHeader(java.lang.String name, java.lang.String value)Set a header in the response.RestResponseBuildersetStatus(int status)Set the response statusRestResponseBuildersetStatus(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)
 
 - 
 
 -