Package org.restheart.exchange
Class StringResponse
- Author:
- Andrea Di Cesare <[email protected]>
-
Field Summary
Fields inherited from class org.restheart.exchange.ServiceResponse
content
Fields inherited from class org.restheart.exchange.Exchange
APPLICATION_PDF_TYPE, FORM_URLENCODED, HAL_JSON_MEDIA_TYPE, IN_ERROR_KEY, JSON_MEDIA_TYPE, MAX_BUFFERS, MAX_CONTENT_SIZE, MULTIPART, wrapped
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringResponse
init
(io.undertow.server.HttpServerExchange exchange) static StringResponse
of
(io.undertow.server.HttpServerExchange exchange) Reads the content as a String.void
setInError
(int code, String message, Throwable t) Methods inherited from class org.restheart.exchange.ServiceResponse
getContent, getCustomerSender, of, setContent, setCustomSender
Methods inherited from class org.restheart.exchange.Response
getContentType, getContentType, getHeader, getHeader, getHeaders, getMDCContext, getStatusCode, setContentType, setContentTypeAsJson, setHeader, setHeader, setInError, setMDCContext, setStatusCode
Methods inherited from class org.restheart.exchange.Exchange
getExchange, getWrappedExchange, isAccountInRole, isAuthenticated, isAuthenticated, isContentTypeFormOrMultipart, isContentTypeFormOrMultipart, isContentTypeJson, isContentTypeJson, isContentTypeText, isContentTypeXml, isInError, isInError, responseInterceptorsExecuted, setInError, setInError, setResponseInterceptorsExecuted, updateBufferSize
-
Method Details
-
init
-
of
-
readContent
Description copied from class:ServiceResponse
Reads the content as a String. This method is used by ResponseSender to generate the response content to send to the client.- Specified by:
readContent
in classServiceResponse<String>
- Returns:
- the content as string
-
setInError
- Specified by:
setInError
in classServiceResponse<String>
t
- can be null
-