public class AzureFunctionHttpTriggerHandler
extends java.lang.Object
TODO: multipart post is not yet supported but could be implemented: https://stackoverflow.com/questions/54473126/azure-functions-how-to-use-the-multiparthttpservletrequest-class-from-the-de
Similar functionality for AWS Lambdas is provided by io.inversion.lambda.AwsApiGatewayLambdaRequestStreamHandler
| Modifier and Type | Field and Description |
|---|---|
protected io.inversion.Api |
api |
protected io.inversion.Engine |
engine |
| Constructor and Description |
|---|
AzureFunctionHttpTriggerHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected io.inversion.Api |
buildApi(com.microsoft.azure.functions.HttpRequestMessage<java.util.Optional<java.lang.String>> request,
com.microsoft.azure.functions.ExecutionContext context)
Optional subclass override hook to supply your own custom wired up Api.
|
protected io.inversion.Engine |
buildEngine(com.microsoft.azure.functions.HttpRequestMessage<java.util.Optional<java.lang.String>> request,
com.microsoft.azure.functions.ExecutionContext context)
Optional subclass override hook to allow for advanced Engine configuration.
|
protected com.microsoft.azure.functions.HttpResponseMessage |
buildHttpResponseMessage(com.microsoft.azure.functions.HttpRequestMessage<java.util.Optional<java.lang.String>> azReq,
io.inversion.Request req,
io.inversion.Response res) |
protected io.inversion.Request |
buildRequest(com.microsoft.azure.functions.HttpRequestMessage<java.util.Optional<java.lang.String>> request) |
io.inversion.Api |
getApi() |
io.inversion.Engine |
getEngine() |
com.microsoft.azure.functions.HttpResponseMessage |
run(com.microsoft.azure.functions.HttpRequestMessage<java.util.Optional<java.lang.String>> request,
com.microsoft.azure.functions.ExecutionContext context) |
void |
setApi(io.inversion.Api api) |
void |
setEngine(io.inversion.Engine engine) |
public com.microsoft.azure.functions.HttpResponseMessage run(com.microsoft.azure.functions.HttpRequestMessage<java.util.Optional<java.lang.String>> request,
com.microsoft.azure.functions.ExecutionContext context)
protected io.inversion.Request buildRequest(com.microsoft.azure.functions.HttpRequestMessage<java.util.Optional<java.lang.String>> request)
protected com.microsoft.azure.functions.HttpResponseMessage buildHttpResponseMessage(com.microsoft.azure.functions.HttpRequestMessage<java.util.Optional<java.lang.String>> azReq,
io.inversion.Request req,
io.inversion.Response res)
throws java.lang.Exception
java.lang.Exceptionprotected io.inversion.Engine buildEngine(com.microsoft.azure.functions.HttpRequestMessage<java.util.Optional<java.lang.String>> request,
com.microsoft.azure.functions.ExecutionContext context)
Simple embeddings can leave this alone. Complex embeddings can either set the engine via setEngine() or override this method to construct/configure as needed.
This default implementation constructs an Engine with the supplied configProfile and adds api to it if api is not null.
If api is null, it calls buildApi() which by default does nothing and is itself designed as an override hook.
request - the request to servicecontext - the execution contextbuildApi(HttpRequestMessage, ExecutionContext)protected io.inversion.Api buildApi(com.microsoft.azure.functions.HttpRequestMessage<java.util.Optional<java.lang.String>> request,
com.microsoft.azure.functions.ExecutionContext context)
If you don't set your api via setApi() and you don't override buildApi() to supply an Api
or otherwise wire your custom Api and Engine in an overridden buildEngine() method, you will need to define your Api in inversion.properties files for autowiring via Confg/Configurator.
request - the request to servicecontext - the execution contextbuildEngine(com.microsoft.azure.functions.HttpRequestMessage<java.util.Optional<java.lang.String>>, com.microsoft.azure.functions.ExecutionContext)public io.inversion.Engine getEngine()
public void setEngine(io.inversion.Engine engine)
public io.inversion.Api getApi()
public void setApi(io.inversion.Api api)
Copyright © 2021 Rocket Partners, LLC. All rights reserved.