Package org.restheart.exchange
Class ByteArrayProxyRequest
java.lang.Object
org.restheart.exchange.Exchange<byte[]>
org.restheart.exchange.Request<byte[]>
org.restheart.exchange.ProxyRequest<byte[]>
org.restheart.exchange.ByteArrayProxyRequest
- All Implemented Interfaces:
AutoCloseable,BufferedExchange<byte[]>
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
Field Summary
Fields inherited from class org.restheart.exchange.Request
PATCH, PIPELINE_INFO_KEY, SLASH, UNDERSCOREFields 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 -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedByteArrayProxyRequest(io.undertow.server.HttpServerExchange exchange) -
Method Summary
Modifier and TypeMethodDescriptionstatic ByteArrayProxyRequestof(io.undertow.server.HttpServerExchange exchange) byte[]reads data from the buffer converting it to Tstatic Typetype()voidwriteContent(byte[] content) updates the request content allocates the PooledByteBuffer array so close() must be invoked to avoid memory leaksMethods inherited from class org.restheart.exchange.ProxyRequest
close, getBuffer, getRawContentKey, isContentAvailable, setBufferMethods inherited from class org.restheart.exchange.Request
addXForwardedHeader, blockForTooManyRequests, getAuthenticatedAccount, getContentType, getContentType, getCookie, getHeader, getHeaders, getMethod, getPath, getPathParam, getPathParams, getPipelineInfo, getPipelineInfo, getQueryParameterOfDefault, getQueryParameterOrDefault, getQueryParameters, getQueryString, getRequestContentLength, getStartTime, getURL, getXForwardedHeaders, isAuthenticated, isBlockForTooManyRequests, isDelete, isGet, isOptions, isPatch, isPost, isPut, pipelineInfo, setContentLength, setContentType, setContentTypeAsJson, setHeader, setHeader, setPipelineInfo, setPipelineInfo, setStartTimeMethods inherited from class org.restheart.exchange.Exchange
getExchange, getWrappedExchange, isAccountInRole, isAuthenticated, isContentTypeFormOrMultipart, isContentTypeFormOrMultipart, isContentTypeJson, isContentTypeJson, isContentTypeText, isContentTypeXml, isInError, isInError, responseInterceptorsExecuted, setInError, setInError, setResponseInterceptorsExecuted, updateBufferSize
-
Constructor Details
-
ByteArrayProxyRequest
protected ByteArrayProxyRequest(io.undertow.server.HttpServerExchange exchange)
-
-
Method Details
-
of
-
type
-
readContent
Description copied from interface:BufferedExchangereads data from the buffer converting it to T- Specified by:
readContentin interfaceBufferedExchange<byte[]>- Specified by:
readContentin classProxyRequest<byte[]>- Returns:
- the content as Json
- Throws:
IOException
-
writeContent
updates the request content allocates the PooledByteBuffer array so close() must be invoked to avoid memory leaks- Specified by:
writeContentin interfaceBufferedExchange<byte[]>- Specified by:
writeContentin classProxyRequest<byte[]>- Parameters:
content-- Throws:
IOException
-