Package io.micronaut.function.aws.proxy
Class ApiGatewayServletRequest<T,REQ,RES>  
java.lang.Object
io.micronaut.function.aws.proxy.ApiGatewayServletRequest<T,REQ,RES>  
- Type Parameters:
- T- The body type
- REQ- The request event type
- RES- The response event type
- All Implemented Interfaces:
- io.micronaut.core.attr.AttributeHolder,- io.micronaut.core.attr.MutableAttributeHolder,- io.micronaut.core.convert.ConversionServiceAware,- io.micronaut.http.FullHttpRequest<T>,- io.micronaut.http.HttpMessage<T>,- io.micronaut.http.HttpRequest<T>,- io.micronaut.http.MutableHttpMessage<T>,- io.micronaut.http.MutableHttpRequest<T>,- io.micronaut.servlet.http.MutableServletHttpRequest<REQ,,- T> - io.micronaut.servlet.http.ParsedBodyHolder<T>,- io.micronaut.servlet.http.ServletExchange<REQ,,- RES> - io.micronaut.servlet.http.ServletHttpRequest<REQ,- T> 
- Direct Known Subclasses:
- ApiGatewayProxyServletRequest,- APIGatewayV2HTTPEventServletRequest,- ApplicationLoadBalancerServletRequest
@Internal
public abstract class ApiGatewayServletRequest<T,REQ,RES>  
extends Object
implements io.micronaut.servlet.http.MutableServletHttpRequest<REQ,T>, io.micronaut.servlet.http.ServletExchange<REQ,RES>, io.micronaut.http.FullHttpRequest<T>, io.micronaut.servlet.http.ParsedBodyHolder<T>  
Base class for all the versions of the Gateway events.
- 
Nested Class SummaryNested classes/interfaces inherited from interface io.micronaut.servlet.http.ServletHttpRequestio.micronaut.servlet.http.ServletHttpRequest.AsyncExecution, io.micronaut.servlet.http.ServletHttpRequest.AsyncExecutionCallback
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected io.micronaut.core.convert.ConversionServiceprotected final REQFields inherited from interface io.micronaut.http.HttpRequestSCHEME_HTTP, SCHEME_HTTPS
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedApiGatewayServletRequest(io.micronaut.core.convert.ConversionService conversionService, REQ request, URI uri, io.micronaut.http.HttpMethod httpMethod, org.slf4j.Logger log, io.micronaut.servlet.http.BodyBuilder bodyBuilder) 
- 
Method SummaryModifier and TypeMethodDescription<B> io.micronaut.http.MutableHttpRequest<B>body(B body) @Nullable io.micronaut.core.execution.ExecutionFlow<io.micronaut.core.io.buffer.ByteBuffer<?>>protected static URIbuildUri(@Nullable String path, @Nullable Map<String, String> queryParameters, @Nullable Map<String, List<String>> multiQueryParameters) Given a path and the query params from the event, build a URI.@Nullable io.micronaut.core.io.buffer.ByteBuffer<?>contents()io.micronaut.http.MutableHttpRequest<T>cookie(io.micronaut.http.cookie.Cookie cookie) io.micronaut.core.convert.value.MutableConvertibleValues<Object>getBody()<B> @NonNull Optional<B>getBody(io.micronaut.core.type.Argument<B> arg) abstract byte[]protected byte[]getBodyBytes(@NonNull Supplier<String> bodySupplier, @NonNull BooleanSupplier base64EncodedSupplier) @NonNull io.micronaut.http.cookie.Cookiesprotected @NonNull io.micronaut.http.MutableHttpHeadersgetHeaders(@NonNull Supplier<Map<String, String>> singleHeaders, @NonNull Supplier<Map<String, List<String>>> multiValueHeaders) io.micronaut.http.HttpMethodprotected @NonNull io.micronaut.http.MutableHttpParametersgetParameters(@NonNull Supplier<Map<String, String>> queryStringParametersSupplier, @NonNull Supplier<Map<String, List<String>>> multiQueryStringParametersSupplier) getParametersFromBody(Map<String, String> queryStringParameters) Parse the parameters from the body.getUri()protected booleanisFormSubmission(io.micronaut.http.MediaType contentType) protected static io.micronaut.http.HttpMethodparseMethod(Supplier<String> httpMethodConsumer) voidsetConversionService(io.micronaut.core.convert.ConversionService conversionService) voidsetParsedBody(T body) splitCommaSeparatedValue(@Nullable String value) transformCommaSeparatedValue(@Nullable Map<String, String> input) io.micronaut.http.MutableHttpRequest<T>Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.attr.AttributeHoldergetAttribute, getAttributeMethods inherited from interface io.micronaut.http.FullHttpRequestisFullMethods inherited from interface io.micronaut.http.HttpMessagegetBody, getBody, getBodyWriter, getCharacterEncoding, getContentLength, getContentTypeMethods inherited from interface io.micronaut.http.HttpRequestaccept, getCertificate, getHttpVersion, getLocale, getMethodName, getOrigin, getPath, getRemoteAddress, getServerAddress, getServerName, getUserPrincipal, getUserPrincipal, isSecure, mutate, setAttributeMethods inherited from interface io.micronaut.core.attr.MutableAttributeHolderremoveAttributeMethods inherited from interface io.micronaut.http.MutableHttpMessagebodyWriterMethods inherited from interface io.micronaut.http.MutableHttpRequestaccept, accept, basicAuth, bearerAuth, contentEncoding, contentLength, contentType, contentType, cookies, getHeaders, getParameters, header, headers, headers, uriMethods inherited from interface io.micronaut.servlet.http.ServletExchangegetResponseMethods inherited from interface io.micronaut.servlet.http.ServletHttpRequestexecuteAsync, getContextPath, isAsyncSupported
- 
Field Details- 
conversionServiceprotected io.micronaut.core.convert.ConversionService conversionService
- 
requestEvent
 
- 
- 
Constructor Details- 
ApiGatewayServletRequest
 
- 
- 
Method Details- 
getBodyBytes- Throws:
- IOException
 
- 
buildUriprotected static URI buildUri(@Nullable @Nullable String path, @Nullable @Nullable Map<String, String> queryParameters, @Nullable @Nullable Map<String, List<String>> multiQueryParameters) Given a path and the query params from the event, build a URI.- Parameters:
- path- the request path
- queryParameters- the query parameters from the event
- multiQueryParameters- the multi-value query parameters from the event
- Returns:
- the URI
- Since:
- 4.0.3
 
- 
parseMethod
- 
getInputStream- Specified by:
- getInputStreamin interface- io.micronaut.servlet.http.ServletHttpRequest<T,- REQ> 
- Throws:
- IOException
 
- 
getRequest
- 
getReader- Specified by:
- getReaderin interface- io.micronaut.servlet.http.ServletHttpRequest<T,- REQ> 
- Throws:
- IOException
 
- 
getNativeRequest
- 
getMethodpublic io.micronaut.http.HttpMethod getMethod()- Specified by:
- getMethodin interface- io.micronaut.http.HttpRequest<T>
 
- 
getUri- Specified by:
- getUriin interface- io.micronaut.http.HttpRequest<T>
 
- 
getCookies@NonNull public @NonNull io.micronaut.http.cookie.Cookies getCookies()- Specified by:
- getCookiesin interface- io.micronaut.http.HttpRequest<T>
 
- 
getAttributes- Specified by:
- getAttributesin interface- io.micronaut.core.attr.AttributeHolder
- Specified by:
- getAttributesin interface- io.micronaut.http.HttpMessage<T>
- Specified by:
- getAttributesin interface- io.micronaut.core.attr.MutableAttributeHolder
 
- 
getBody- Specified by:
- getBodyin interface- io.micronaut.http.HttpMessage<T>
 
- 
getBody- Specified by:
- getBodyin interface- io.micronaut.http.HttpMessage<T>
 
- 
isFormSubmissionprotected boolean isFormSubmission(io.micronaut.http.MediaType contentType) - Parameters:
- contentType- Content Type
- Returns:
- returns true if the content type is either application/x-www-form-urlencoded or multipart/form-data
 
- 
cookie- Specified by:
- cookiein interface- io.micronaut.http.MutableHttpRequest<T>
 
- 
uri- Specified by:
- uriin interface- io.micronaut.http.MutableHttpRequest<T>
 
- 
bodypublic <B> io.micronaut.http.MutableHttpRequest<B> body(B body) 
- 
getParametersFromBodyprotected MapListOfStringAndMapStringMutableHttpParameters getParametersFromBody(Map<String, String> queryStringParameters) Parse the parameters from the body.- Parameters:
- queryStringParameters- Any query string parameters
- Returns:
- The parameters
 
- 
setConversionServicepublic void setConversionService(io.micronaut.core.convert.ConversionService conversionService) - Specified by:
- setConversionServicein interface- io.micronaut.core.convert.ConversionServiceAware
 
- 
setParsedBody- Specified by:
- setParsedBodyin interface- io.micronaut.servlet.http.ParsedBodyHolder<T>
 
- 
contents@Nullable public @Nullable io.micronaut.core.io.buffer.ByteBuffer<?> contents()- Specified by:
- contentsin interface- io.micronaut.http.FullHttpRequest<T>
 
- 
bufferContents@Nullable public @Nullable io.micronaut.core.execution.ExecutionFlow<io.micronaut.core.io.buffer.ByteBuffer<?>> bufferContents()- Specified by:
- bufferContentsin interface- io.micronaut.http.FullHttpRequest<T>
 
- 
getBodyBytesprotected byte[] getBodyBytes(@NonNull @NonNull Supplier<String> bodySupplier, @NonNull @NonNull BooleanSupplier base64EncodedSupplier) throws IOException - Parameters:
- bodySupplier- HTTP Request's Body Supplier
- base64EncodedSupplier- Whether the body is Base 64 encoded
- Returns:
- body bytes
- Throws:
- IOException- if the body is empty
 
- 
splitCommaSeparatedValue
- 
transformCommaSeparatedValue
- 
getParameters@NonNull protected @NonNull io.micronaut.http.MutableHttpParameters getParameters(@NonNull @NonNull Supplier<Map<String, String>> queryStringParametersSupplier, @NonNull @NonNull Supplier<Map<String, List<String>>> multiQueryStringParametersSupplier) - Parameters:
- queryStringParametersSupplier- Query String parameters as a map with key string and value string
- multiQueryStringParametersSupplier- Query String parameters as a map with key string and value list of strings
- Returns:
- Mutable HTTP parameters
 
- 
getHeaders@NonNull protected @NonNull io.micronaut.http.MutableHttpHeaders getHeaders(@NonNull @NonNull Supplier<Map<String, String>> singleHeaders, @NonNull @NonNull Supplier<Map<String, List<String>>> multiValueHeaders) - Parameters:
- singleHeaders- Single value headers
- multiValueHeaders- Multi-value headers
- Returns:
- The combined mutable headers
 
 
-