Package io.micronaut.azure.function.http
Class AzureFunctionHttpRequest<T>
java.lang.Object
io.micronaut.azure.function.http.AzureFunctionHttpRequest<T>
- Type Parameters:
T
- The body 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.http.ServerHttpRequest<T>
,io.micronaut.servlet.http.MutableServletHttpRequest<com.microsoft.azure.functions.HttpRequestMessage<Optional<String>>,
,T> io.micronaut.servlet.http.ParsedBodyHolder<T>
,io.micronaut.servlet.http.ServletExchange<com.microsoft.azure.functions.HttpRequestMessage<Optional<String>>,
,com.microsoft.azure.functions.HttpResponseMessage> io.micronaut.servlet.http.ServletHttpRequest<com.microsoft.azure.functions.HttpRequestMessage<Optional<String>>,
T>
@Internal
public final class AzureFunctionHttpRequest<T>
extends Object
implements io.micronaut.servlet.http.MutableServletHttpRequest<com.microsoft.azure.functions.HttpRequestMessage<Optional<String>>,T>, io.micronaut.servlet.http.ServletExchange<com.microsoft.azure.functions.HttpRequestMessage<Optional<String>>,com.microsoft.azure.functions.HttpResponseMessage>, io.micronaut.http.ServerHttpRequest<T>, io.micronaut.http.FullHttpRequest<T>, io.micronaut.servlet.http.ParsedBodyHolder<T>
Servlet request implementation for Azure Functions.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.servlet.http.ServletHttpRequest
io.micronaut.servlet.http.ServletHttpRequest.AsyncExecution, io.micronaut.servlet.http.ServletHttpRequest.AsyncExecutionCallback
-
Field Summary
Fields inherited from interface io.micronaut.http.HttpRequest
SCHEME_HTTP, SCHEME_HTTPS
-
Constructor Summary
ConstructorDescriptionAzureFunctionHttpRequest
(com.microsoft.azure.functions.HttpRequestMessage<Optional<String>> request, AzureFunctionHttpResponse<Object> response, com.microsoft.azure.functions.ExecutionContext executionContext, io.micronaut.core.convert.ConversionService conversionService, io.micronaut.function.BinaryTypeConfiguration binaryTypeConfiguration, io.micronaut.servlet.http.BodyBuilder bodyBuilder) -
Method Summary
Modifier and TypeMethodDescription<B> io.micronaut.http.MutableHttpRequest<B>
body
(B body) @Nullable io.micronaut.core.execution.ExecutionFlow<io.micronaut.core.io.buffer.ByteBuffer<?>>
@NonNull io.micronaut.http.body.AvailableByteBody
byteBody()
@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) byte[]
@NonNull io.micronaut.http.cookie.Cookies
com.microsoft.azure.functions.ExecutionContext
io.micronaut.http.MutableHttpHeaders
io.micronaut.http.HttpMethod
io.micronaut.http.MutableHttpParameters
io.micronaut.servlet.http.ServletHttpRequest<com.microsoft.azure.functions.HttpRequestMessage<Optional<String>>,
? super Object> io.micronaut.servlet.http.ServletHttpResponse<com.microsoft.azure.functions.HttpResponseMessage,
?> getUri()
void
setConversionService
(io.micronaut.core.convert.ConversionService conversionService) void
setParsedBody
(T body) io.micronaut.http.MutableHttpRequest<T>
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.core.attr.AttributeHolder
getAttribute, getAttribute
Methods inherited from interface io.micronaut.http.FullHttpRequest
isFull
Methods inherited from interface io.micronaut.http.HttpMessage
getBody, getBody, getBodyWriter, getCharacterEncoding, getContentLength, getContentType
Methods inherited from interface io.micronaut.http.HttpRequest
accept, getCertificate, getHttpVersion, getLocale, getMethodName, getOrigin, getPath, getRemoteAddress, getServerAddress, getServerName, getSslSession, getUserPrincipal, getUserPrincipal, isSecure, mutate, setAttribute
Methods inherited from interface io.micronaut.core.attr.MutableAttributeHolder
removeAttribute
Methods inherited from interface io.micronaut.http.MutableHttpMessage
bodyWriter
Methods inherited from interface io.micronaut.http.MutableHttpRequest
accept, accept, basicAuth, bearerAuth, contentEncoding, contentLength, contentType, contentType, cookies, header, headers, headers, uri
Methods inherited from interface io.micronaut.servlet.http.ServletHttpRequest
executeAsync, getContextPath, isAsyncSupported
-
Constructor Details
-
AzureFunctionHttpRequest
public AzureFunctionHttpRequest(com.microsoft.azure.functions.HttpRequestMessage<Optional<String>> request, AzureFunctionHttpResponse<Object> response, com.microsoft.azure.functions.ExecutionContext executionContext, io.micronaut.core.convert.ConversionService conversionService, io.micronaut.function.BinaryTypeConfiguration binaryTypeConfiguration, io.micronaut.servlet.http.BodyBuilder bodyBuilder)
-
-
Method Details
-
getExecutionContext
public com.microsoft.azure.functions.ExecutionContext getExecutionContext() -
getBodyBytes
- Throws:
IOException
-
byteBody
@NonNull public @NonNull io.micronaut.http.body.AvailableByteBody byteBody()- Specified by:
byteBody
in interfaceio.micronaut.http.ServerHttpRequest<T>
-
getHeaders
public io.micronaut.http.MutableHttpHeaders getHeaders() -
getParameters
public io.micronaut.http.MutableHttpParameters getParameters() -
getResponse
public io.micronaut.servlet.http.ServletHttpResponse<com.microsoft.azure.functions.HttpResponseMessage,?> getResponse() -
getInputStream
- Specified by:
getInputStream
in interfaceio.micronaut.servlet.http.ServletHttpRequest<com.microsoft.azure.functions.HttpRequestMessage<Optional<String>>,
T> - Throws:
IOException
-
getRequest
-
getReader
- Specified by:
getReader
in interfaceio.micronaut.servlet.http.ServletHttpRequest<com.microsoft.azure.functions.HttpRequestMessage<Optional<String>>,
T> - Throws:
IOException
-
getNativeRequest
-
getMethod
public io.micronaut.http.HttpMethod getMethod()- Specified by:
getMethod
in interfaceio.micronaut.http.HttpRequest<T>
-
getUri
- Specified by:
getUri
in interfaceio.micronaut.http.HttpRequest<T>
-
getCookies
@NonNull public @NonNull io.micronaut.http.cookie.Cookies getCookies()- Specified by:
getCookies
in interfaceio.micronaut.http.HttpRequest<T>
-
getAttributes
- Specified by:
getAttributes
in interfaceio.micronaut.core.attr.AttributeHolder
- Specified by:
getAttributes
in interfaceio.micronaut.http.HttpMessage<T>
- Specified by:
getAttributes
in interfaceio.micronaut.core.attr.MutableAttributeHolder
-
getBody
- Specified by:
getBody
in interfaceio.micronaut.http.HttpMessage<T>
-
getBody
- Specified by:
getBody
in interfaceio.micronaut.http.HttpMessage<T>
-
cookie
- Specified by:
cookie
in interfaceio.micronaut.http.MutableHttpRequest<T>
-
uri
- Specified by:
uri
in interfaceio.micronaut.http.MutableHttpRequest<T>
-
body
public <B> io.micronaut.http.MutableHttpRequest<B> body(B body) -
setConversionService
public void setConversionService(io.micronaut.core.convert.ConversionService conversionService) - Specified by:
setConversionService
in interfaceio.micronaut.core.convert.ConversionServiceAware
-
setParsedBody
- Specified by:
setParsedBody
in interfaceio.micronaut.servlet.http.ParsedBodyHolder<T>
-
contents
@Nullable public @Nullable io.micronaut.core.io.buffer.ByteBuffer<?> contents()- Specified by:
contents
in interfaceio.micronaut.http.FullHttpRequest<T>
-
bufferContents
@Nullable public @Nullable io.micronaut.core.execution.ExecutionFlow<io.micronaut.core.io.buffer.ByteBuffer<?>> bufferContents()- Specified by:
bufferContents
in interfaceio.micronaut.http.FullHttpRequest<T>
-