Package com.opencloud.slee.rest.common
Interface RestResponseCreator
- 
public interface RestResponseCreatorThe interface between generated event classes and the REST RA. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RestResponseBuildercreateResponse(int statusCode, java.lang.String api, java.lang.String operationId)Create a new response<T> java.lang.StringencodeHeaderListValue(java.lang.Class<T> elementType, java.util.List<T> value)<T> java.lang.StringencodeHeaderValue(java.lang.Class<T> type, T value)byte[]encodeResponseBody(java.lang.String contentType, java.lang.Object responseBody)Encode the response body 
 - 
 
- 
- 
Method Detail
- 
createResponse
RestResponseBuilder createResponse(int statusCode, java.lang.String api, java.lang.String operationId)
Create a new response- Parameters:
 statusCode- the response status codeapi- the api the operation is foroperationId- the corresponding operation-id- Returns:
 - a new response builder implementation
 
 
- 
encodeResponseBody
byte[] encodeResponseBody(java.lang.String contentType, java.lang.Object responseBody)Encode the response body- Parameters:
 contentType- content type for the response bodyresponseBody- the response body- Returns:
 - the encoded response body
 
 
- 
encodeHeaderValue
<T> java.lang.String encodeHeaderValue(java.lang.Class<T> type, T value) 
- 
encodeHeaderListValue
<T> java.lang.String encodeHeaderListValue(java.lang.Class<T> elementType, java.util.List<T> value) 
 - 
 
 -