Package org.restheart.exchange
Class StringResponse
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
Field Summary
Fields inherited from class org.restheart.exchange.ServiceResponse
contentFields 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, TEXT_PLAIN_CONTENT_TYPE, wrapped -
Method Summary
Modifier and TypeMethodDescriptionstatic StringResponseinit(io.undertow.server.HttpServerExchange exchange) static StringResponseof(io.undertow.server.HttpServerExchange exchange) Reads the content as a String.voidsetInError(int code, String message, Throwable t) Methods inherited from class org.restheart.exchange.ServiceResponse
getContent, getCustomSender, of, setContent, setCustomSenderMethods inherited from class org.restheart.exchange.Response
getContentType, getContentType, getHeader, getHeader, getHeaders, getMDCContext, getStatusCode, setContentType, setContentTypeAsJson, setHeader, setHeader, setInError, setMDCContext, setStatusCodeMethods 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:ServiceResponseReads the content as a String. This method is used by ResponseSender to generate the response content to send to the client.- Specified by:
readContentin classServiceResponse<String>- Returns:
- the content as string
-
setInError
- Specified by:
setInErrorin classServiceResponse<String>- Parameters:
code-message-t-
-