Interface LocalFunctionRegistry

All Known Implementing Classes:
DefaultLocalFunctionRegistry

public interface LocalFunctionRegistry

A registry of defined FunctionBean instances containing within the current running application.

This interface is designed to allow the location and interaction with non-remote functions

Since:
1.0
  • Field Details

  • Method Details

    • getAvailableFunctions

      Map<String,URI> getAvailableFunctions()
      A map of available functions with the key being the function name and the value being the function URI.
      Returns:
      A map of functions
    • findFirst

      <T, R> Optional<? extends io.micronaut.inject.ExecutableMethod<T,R>> findFirst()
      Find the first available registered function.
      Type Parameters:
      T - The declaring type
      R - The result of the method call
      Returns:
      The ExecutableMethod method representing the function
    • find

      <T, R> Optional<? extends io.micronaut.inject.ExecutableMethod<T,R>> find(String name)
      Find the first available registered function.
      Type Parameters:
      T - The declaring type
      R - The result of the method call
      Parameters:
      name - the name
      Returns:
      The ExecutableMethod method representing the function
    • findSupplier

      <T> Optional<io.micronaut.inject.ExecutableMethod<Supplier<T>,T>> findSupplier(String name)
      Find a Supplier for the given name.
      Type Parameters:
      T - The type
      Parameters:
      name - The name
      Returns:
      An Optional of a Supplier
    • findConsumer

      <T> Optional<io.micronaut.inject.ExecutableMethod<Consumer<T>,Void>> findConsumer(String name)
      Find a Consumer for the given name.
      Type Parameters:
      T - The type
      Parameters:
      name - The name
      Returns:
      An Optional of a Consumer
    • findFunction

      <T, R> Optional<io.micronaut.inject.ExecutableMethod<Function<T,R>,R>> findFunction(String name)
      Find a Function for the given name.
      Type Parameters:
      T - The type
      R - The result of the method call
      Parameters:
      name - The name
      Returns:
      An Optional of a Function
    • findBiFunction

      <T, U, R> Optional<io.micronaut.inject.ExecutableMethod<BiFunction<T,U,R>,R>> findBiFunction(String name)
      Find a BiFunction for the given name.
      Type Parameters:
      T - The type
      U - the type of the second argument to the function
      R - The result of the method call
      Parameters:
      name - The name
      Returns:
      An Optional of a BiFunction