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
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FUNCTION_CHARSET
The name of the default function name.
|
static java.lang.String |
FUNCTION_NAME
The name of the default function name.
|
static java.lang.String |
FUNCTION_PREFIX
Prefix used to identify function names.
|
Modifier and Type | Method and Description |
---|---|
<T,R> java.util.Optional<? extends ExecutableMethod<T,R>> |
find(java.lang.String name)
Find the first available registered function.
|
<T,U,R> java.util.Optional<ExecutableMethod<java.util.function.BiFunction<T,U,R>,R>> |
findBiFunction(java.lang.String name)
Find a
BiFunction for the given name. |
<T> java.util.Optional<ExecutableMethod<java.util.function.Consumer<T>,java.lang.Void>> |
findConsumer(java.lang.String name)
Find a
Consumer for the given name. |
<T,R> java.util.Optional<? extends ExecutableMethod<T,R>> |
findFirst()
Find the first available registered function.
|
<T,R> java.util.Optional<ExecutableMethod<java.util.function.Function<T,R>,R>> |
findFunction(java.lang.String name)
Find a
Function for the given name. |
<T> java.util.Optional<ExecutableMethod<java.util.function.Supplier<T>,T>> |
findSupplier(java.lang.String name)
Find a
Supplier for the given name. |
java.util.Map<java.lang.String,java.net.URI> |
getAvailableFunctions()
A map of available functions with the key being the function name and the value being the function URI.
|
static final java.lang.String FUNCTION_NAME
static final java.lang.String FUNCTION_CHARSET
static final java.lang.String FUNCTION_PREFIX
java.util.Map<java.lang.String,java.net.URI> getAvailableFunctions()
<T,R> java.util.Optional<? extends ExecutableMethod<T,R>> findFirst()
T
- The declaring typeR
- The result of the method callExecutableMethod
method representing the function<T,R> java.util.Optional<? extends ExecutableMethod<T,R>> find(java.lang.String name)
T
- The declaring typeR
- The result of the method callname
- the nameExecutableMethod
method representing the function<T> java.util.Optional<ExecutableMethod<java.util.function.Supplier<T>,T>> findSupplier(java.lang.String name)
Supplier
for the given name.T
- The typename
- The nameOptional
of a Supplier
<T> java.util.Optional<ExecutableMethod<java.util.function.Consumer<T>,java.lang.Void>> findConsumer(java.lang.String name)
Consumer
for the given name.T
- The typename
- The nameOptional
of a Consumer
<T,R> java.util.Optional<ExecutableMethod<java.util.function.Function<T,R>,R>> findFunction(java.lang.String name)
Function
for the given name.T
- The typeR
- The result of the method callname
- The nameOptional
of a Function
<T,U,R> java.util.Optional<ExecutableMethod<java.util.function.BiFunction<T,U,R>,R>> findBiFunction(java.lang.String name)
BiFunction
for the given name.T
- The typeU
- the type of the second argument to the functionR
- The result of the method callname
- The nameOptional
of a BiFunction