Class OciFunction

java.lang.Object
io.micronaut.oraclecloud.function.OciFunction
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
HttpFunction

public abstract class OciFunction extends Object implements AutoCloseable
Parent class that can be used for Oracle Cloud functions.
Since:
1.0.0
Author:
graemerocher
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
    OciFunction(io.micronaut.context.ApplicationContext applicationContext)
    Construct a function with the given context.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected boolean
     
    final @NonNull io.micronaut.context.ApplicationContext
     
    protected @NonNull io.micronaut.context.ApplicationContextBuilder
    newApplicationContextBuilder(com.fnproject.fn.api.RuntimeContext ctx)
    Construct the application context with the given builder.
    protected void
    setup(com.fnproject.fn.api.RuntimeContext ctx)
    Setup method that can be overridden by users to add customizations.
    final void
    setupContext(com.fnproject.fn.api.RuntimeContext ctx)
    Sets of the function and creates the application context.

    Methods inherited from class java.lang.Object

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

    • OciFunction

      public OciFunction()
      Default constructor. Uses a self managed application context.
    • OciFunction

      public OciFunction(io.micronaut.context.ApplicationContext applicationContext)
      Construct a function with the given context.
      Parameters:
      applicationContext - The application context
  • Method Details

    • setupContext

      public final void setupContext(com.fnproject.fn.api.RuntimeContext ctx)
      Sets of the function and creates the application context.
      Parameters:
      ctx - The application context.
    • setup

      protected void setup(com.fnproject.fn.api.RuntimeContext ctx)
      Setup method that can be overridden by users to add customizations.
      Parameters:
      ctx - The runtime context
    • enableSharedJackson

      protected boolean enableSharedJackson()
      Returns:
      Whether Micronaut's shared Jackson object mapper should be used.
    • getApplicationContext

      @NonNull public final @NonNull io.micronaut.context.ApplicationContext getApplicationContext()
      Returns:
      The application context.
    • newApplicationContextBuilder

      @NonNull protected @NonNull io.micronaut.context.ApplicationContextBuilder newApplicationContextBuilder(com.fnproject.fn.api.RuntimeContext ctx)
      Construct the application context with the given builder.
      Parameters:
      ctx - The context
      Returns:
      The builder
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable