Package org.restheart.exchange
Class JsonProxyRequest
- java.lang.Object
-
- org.restheart.exchange.Exchange<T>
-
- org.restheart.exchange.Request<T>
-
- org.restheart.exchange.ProxyRequest<com.google.gson.JsonElement>
-
- org.restheart.exchange.JsonProxyRequest
-
- All Implemented Interfaces:
BufferedExchange<com.google.gson.JsonElement>
public class JsonProxyRequest extends ProxyRequest<com.google.gson.JsonElement>
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
-
Field Summary
-
Fields inherited from class org.restheart.exchange.Request
FORM_URLENCODED, MULTIPART, PATCH, SLASH, UNDERSCORE
-
Fields inherited from class org.restheart.exchange.Exchange
APP_FORM_URLENCODED_TYPE, APPLICATION_PDF_TYPE, HAL_JSON_MEDIA_TYPE, IN_ERROR_KEY, JSON_MEDIA_TYPE, LOGGER, MAX_BUFFERS, MAX_CONTENT_SIZE, MULTIPART_FORM_DATA_TYPE, wrapped
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJsonProxyRequest(io.undertow.server.HttpServerExchange exchange)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JsonProxyRequestof(io.undertow.server.HttpServerExchange exchange)com.google.gson.JsonElementreadContent()reads data from the buffer converting it to TvoidwriteContent(com.google.gson.JsonElement content)writes data the buffer from T-
Methods inherited from class org.restheart.exchange.ProxyRequest
getBuffer, getRawContentKey, isContentAvailable, setBuffer
-
Methods inherited from class org.restheart.exchange.Request
addXForwardedHeader, getAuthenticatedAccount, getContentType, getContentType, getMethod, getPath, getPipelineInfo, getStartTime, getXForwardedHeaders, isContentTypeFormOrMultipart, isContentTypeFormOrMultipart, isContentTypeJson, isDelete, isGet, isOptions, isPatch, isPost, isPut, setContentLength, setContentType, setContentTypeAsJson, setPipelineInfo, setStartTime
-
Methods inherited from class org.restheart.exchange.Exchange
getExchange, getWrappedExchange, isAccountInRole, isAuthenticated, isAuthenticated, isContentTypeJson, isContentTypeText, isContentTypeXml, isInError, isInError, responseInterceptorsExecuted, setInError, setInError, setResponseInterceptorsExecuted, updateBufferSize
-
-
-
-
Method Detail
-
of
public static JsonProxyRequest of(io.undertow.server.HttpServerExchange exchange)
-
readContent
public com.google.gson.JsonElement readContent() throws IOExceptionDescription copied from interface:BufferedExchangereads data from the buffer converting it to T- Specified by:
readContentin interfaceBufferedExchange<com.google.gson.JsonElement>- Specified by:
readContentin classProxyRequest<com.google.gson.JsonElement>- Returns:
- the content as Json
- Throws:
IOException
-
writeContent
public void writeContent(com.google.gson.JsonElement content) throws IOExceptionDescription copied from interface:BufferedExchangewrites data the buffer from T- Specified by:
writeContentin interfaceBufferedExchange<com.google.gson.JsonElement>- Specified by:
writeContentin classProxyRequest<com.google.gson.JsonElement>- Throws:
IOException
-
-