Class HttpFunction
- java.lang.Object
 - 
- io.micronaut.oraclecloud.function.OciFunction
 - 
- io.micronaut.oraclecloud.function.http.HttpFunction
 
 
 
- 
- All Implemented Interfaces:
 java.lang.AutoCloseable
@Singleton public class HttpFunction extends OciFunction
An parent HttpFunction for authoring Project.fn gateway functions.- Since:
 - 1.0.0
 - Author:
 - graemerocher
 
 
- 
- 
Constructor Summary
Constructors Modifier Constructor Description HttpFunction()Default constructor.protectedHttpFunction(io.micronaut.context.ApplicationContext applicationContext)Constructor for using a shared application context. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.micronaut.servlet.http.ServletHttpHandler<com.fnproject.fn.api.InputEvent,com.fnproject.fn.api.OutputEvent>getHttpHandler()com.fnproject.fn.api.OutputEventhandleRequest(com.fnproject.fn.api.httpgateway.HTTPGatewayContext gatewayContext, com.fnproject.fn.api.InputEvent inputEvent)Main entry point for Gateway functions for Project.fn.protected voidsetup(com.fnproject.fn.api.RuntimeContext ctx)Setup method that can be overridden by users to add customizations.protected voidsetupGateway(com.fnproject.fn.api.RuntimeContext ctx)Method that subclasses can override to customize gateway setup.- 
Methods inherited from class io.micronaut.oraclecloud.function.OciFunction
close, enableSharedJackson, getApplicationContext, newApplicationContextBuilder, setupContext 
 - 
 
 - 
 
- 
- 
Method Detail
- 
setup
protected final void setup(com.fnproject.fn.api.RuntimeContext ctx)
Description copied from class:OciFunctionSetup method that can be overridden by users to add customizations.- Overrides:
 setupin classOciFunction- Parameters:
 ctx- The runtime context
 
- 
setupGateway
protected void setupGateway(@NonNull com.fnproject.fn.api.RuntimeContext ctx)Method that subclasses can override to customize gateway setup.- Parameters:
 ctx- The context
 
- 
getHttpHandler
@NonNull public final io.micronaut.servlet.http.ServletHttpHandler<com.fnproject.fn.api.InputEvent,com.fnproject.fn.api.OutputEvent> getHttpHandler()
- Returns:
 - The HTTP handler.
 
 
- 
handleRequest
public com.fnproject.fn.api.OutputEvent handleRequest(com.fnproject.fn.api.httpgateway.HTTPGatewayContext gatewayContext, com.fnproject.fn.api.InputEvent inputEvent)Main entry point for Gateway functions for Project.fn.- Parameters:
 gatewayContext- The gateway contextinputEvent- The input event- Returns:
 - The output event
 
 
 - 
 
 -