Package io.micronaut.function
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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescription<T,R> Optional<? extends io.micronaut.inject.ExecutableMethod<T, R>> Find the first available registered function.<T,U, R> Optional<io.micronaut.inject.ExecutableMethod<BiFunction<T, U, R>, R>> findBiFunction(String name) Find aBiFunctionfor the given name.findConsumer(String name) Find aConsumerfor the given name.<T,R> Optional<? extends io.micronaut.inject.ExecutableMethod<T, R>> Find the first available registered function.findFunction(String name) Find aFunctionfor the given name.findSupplier(String name) Find aSupplierfor the given name.A map of available functions with the key being the function name and the value being the function URI.
-
Field Details
-
FUNCTION_NAME
The name of the default function name.- See Also:
-
FUNCTION_CHARSET
The name of the default function name.- See Also:
-
FUNCTION_PREFIX
Prefix used to identify function names.- See Also:
-
-
Method Details
-
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
Find the first available registered function.- Type Parameters:
T- The declaring typeR- The result of the method call- Returns:
- The
ExecutableMethodmethod representing the function
-
find
Find the first available registered function.- Type Parameters:
T- The declaring typeR- The result of the method call- Parameters:
name- the name- Returns:
- The
ExecutableMethodmethod representing the function
-
findSupplier
Find aSupplierfor the given name. -
findConsumer
Find aConsumerfor the given name. -
findFunction
Find aFunctionfor the given name. -
findBiFunction
<T,U, Optional<io.micronaut.inject.ExecutableMethod<BiFunction<T,R> U, findBiFunctionR>, R>> (String name) Find aBiFunctionfor the given name.- Type Parameters:
T- The typeU- the type of the second argument to the functionR- The result of the method call- Parameters:
name- The name- Returns:
- An
Optionalof aBiFunction
-