@Singleton public class HttpFunction extends OciFunction
| Modifier | Constructor and Description |
|---|---|
|
HttpFunction()
Default constructor.
|
protected |
HttpFunction(io.micronaut.context.ApplicationContext applicationContext)
Constructor for using a shared application context.
|
| Modifier and Type | Method and Description |
|---|---|
io.micronaut.servlet.http.ServletHttpHandler<com.fnproject.fn.api.InputEvent,com.fnproject.fn.api.OutputEvent> |
getHttpHandler() |
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.
|
protected void |
setup(com.fnproject.fn.api.RuntimeContext ctx)
Setup method that can be overridden by users to add customizations.
|
protected void |
setupGateway(com.fnproject.fn.api.RuntimeContext ctx)
Method that subclasses can override to customize gateway setup.
|
close, enableSharedJackson, getApplicationContext, newApplicationContextBuilder, setupContextpublic HttpFunction()
@Inject protected HttpFunction(io.micronaut.context.ApplicationContext applicationContext)
applicationContext - The application contextprotected final void setup(com.fnproject.fn.api.RuntimeContext ctx)
OciFunctionsetup in class OciFunctionctx - The runtime contextprotected void setupGateway(@NonNull
com.fnproject.fn.api.RuntimeContext ctx)
ctx - The context@NonNull public final io.micronaut.servlet.http.ServletHttpHandler<com.fnproject.fn.api.InputEvent,com.fnproject.fn.api.OutputEvent> getHttpHandler()
public com.fnproject.fn.api.OutputEvent handleRequest(com.fnproject.fn.api.httpgateway.HTTPGatewayContext gatewayContext,
com.fnproject.fn.api.InputEvent inputEvent)
gatewayContext - The gateway contextinputEvent - The input event