Class HttpFunction

java.lang.Object
io.micronaut.oraclecloud.function.OciFunction
io.micronaut.oraclecloud.function.http.HttpFunction
All Implemented Interfaces:
AutoCloseable

@Singleton public class HttpFunction extends OciFunction
A parent HttpFunction for authoring Project.fn gateway functions.
Since:
1.0.0
Author:
graemerocher
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    final @NonNull io.micronaut.servlet.http.ServletHttpHandler<com.fnproject.fn.api.InputEvent,com.fnproject.fn.api.OutputEvent>
     
    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 final void
    setup(com.fnproject.fn.api.RuntimeContext ctx)
    Setup method that can be overridden by users to add customizations.
    protected void
    setupGateway(@NonNull 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HttpFunction

      public HttpFunction()
      Default constructor.
  • Method Details

    • setup

      protected final void setup(com.fnproject.fn.api.RuntimeContext ctx)
      Description copied from class: OciFunction
      Setup method that can be overridden by users to add customizations.
      Overrides:
      setup in class OciFunction
      Parameters:
      ctx - The runtime context
    • setupGateway

      protected void setupGateway(@NonNull @NonNull com.fnproject.fn.api.RuntimeContext ctx)
      Method that subclasses can override to customize gateway setup.
      Parameters:
      ctx - The context
    • getHttpHandler

      @NonNull public final @NonNull 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 context
      inputEvent - The input event
      Returns:
      The output event