Class FunctionScript

java.lang.Object
io.micronaut.function.executor.AbstractExecutor
io.micronaut.function.executor.FunctionInitializer
io.micronaut.function.groovy.FunctionScript
All Implemented Interfaces:
io.micronaut.context.ApplicationContextProvider, io.micronaut.context.env.PropertySource, io.micronaut.core.order.Ordered, Closeable, AutoCloseable, Iterable<String>

public abstract class FunctionScript extends io.micronaut.function.executor.FunctionInitializer implements io.micronaut.context.env.PropertySource
Base class for Function scripts.
Since:
1.0
Author:
Graeme Rocher
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.micronaut.function.executor.FunctionInitializer

    io.micronaut.function.executor.FunctionInitializer.ParseContext

    Nested classes/interfaces inherited from interface io.micronaut.context.env.PropertySource

    io.micronaut.context.env.PropertySource.PropertyConvention
  • Field Summary

    Fields inherited from class io.micronaut.function.executor.FunctionInitializer

    closeContext

    Fields inherited from class io.micronaut.function.executor.AbstractExecutor

    applicationContext

    Fields inherited from interface io.micronaut.core.order.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE

    Fields inherited from interface io.micronaut.context.env.PropertySource

    CONTEXT
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    Constuctor.
    protected
    FunctionScript(io.micronaut.context.ApplicationContext applicationContext)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addProperty(String name, Object value)
    Add a property to the script.
    get(String key)
     
    final String
     
    protected void
    injectThis(io.micronaut.context.ApplicationContext applicationContext)
     
     
    protected void
    startThis(io.micronaut.context.ApplicationContext applicationContext)
     

    Methods inherited from class io.micronaut.function.executor.FunctionInitializer

    close, run

    Methods inherited from class io.micronaut.function.executor.AbstractExecutor

    buildApplicationContext, getApplicationContext, newApplicationContextBuilder, resolveFunction, resolveFunctionName, startEnvironment

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator

    Methods inherited from interface io.micronaut.core.order.Ordered

    getOrder

    Methods inherited from interface io.micronaut.context.env.PropertySource

    getConvention
  • Constructor Details

    • FunctionScript

      public FunctionScript()
      Constuctor.
    • FunctionScript

      protected FunctionScript(io.micronaut.context.ApplicationContext applicationContext)
      Constructor.
      Parameters:
      applicationContext - applicationContext
  • Method Details

    • get

      @Internal public Object get(String key)
      Specified by:
      get in interface io.micronaut.context.env.PropertySource
    • getName

      public final String getName()
      Specified by:
      getName in interface io.micronaut.context.env.PropertySource
    • iterator

      @Internal public Iterator<String> iterator()
      Specified by:
      iterator in interface Iterable<String>
    • addProperty

      protected void addProperty(String name, Object value)
      Add a property to the script.
      Parameters:
      name - name of the property
      value - value
    • startThis

      @Internal protected void startThis(io.micronaut.context.ApplicationContext applicationContext)
      Overrides:
      startThis in class io.micronaut.function.executor.FunctionInitializer
    • injectThis

      @Internal protected void injectThis(io.micronaut.context.ApplicationContext applicationContext)
      Overrides:
      injectThis in class io.micronaut.function.executor.FunctionInitializer