Interface RestResponseCreator


  • public interface RestResponseCreator
    The interface between generated event classes and the REST RA.
    • Method Detail

      • createResponse

        RestResponseBuilder createResponse​(int statusCode,
                                           java.lang.String api,
                                           java.lang.String operationId)
        Create a new response
        Parameters:
        statusCode - the response status code
        api - the api the operation is for
        operationId - 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 body
        responseBody - 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)