@Singleton public class DefaultLocalFunctionRegistry extends java.lang.Object implements ExecutableMethodProcessor<FunctionBean>, LocalFunctionRegistry, MediaTypeCodecRegistry
Default implementation of the LocalFunctionRegistry interface
FUNCTION_CHARSET, FUNCTION_NAME, FUNCTION_PREFIX| Constructor and Description | 
|---|
DefaultLocalFunctionRegistry(java.util.List<MediaTypeCodec> decoders)
Constructor. 
 | 
DefaultLocalFunctionRegistry(MediaTypeCodec... decoders)
Constructor. 
 | 
DefaultLocalFunctionRegistry(MediaTypeCodecRegistry codecRegistry)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
java.util.Optional<? extends ExecutableMethod<?,?>> | 
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. | 
java.util.Optional<MediaTypeCodec> | 
findCodec(MediaType mediaType)
Find a codec for the given media type. 
 | 
java.util.Optional<MediaTypeCodec> | 
findCodec(MediaType mediaType,
         java.lang.Class<?> type)
Find a codec for the given media type and target type. 
 | 
<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. | 
java.util.Optional<? extends ExecutableMethod<?,?>> | 
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. 
 | 
java.util.Collection<MediaTypeCodec> | 
getCodecs()  | 
void | 
process(BeanDefinition<?> beanDefinition,
       ExecutableMethod<?,?> method)
The process method will be called for every  
ExecutableMethod that is annotated with the type parameter A. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitof, ofpublic DefaultLocalFunctionRegistry(MediaTypeCodec... decoders)
decoders - decoders@Inject public DefaultLocalFunctionRegistry(java.util.List<MediaTypeCodec> decoders)
decoders - decoderspublic DefaultLocalFunctionRegistry(MediaTypeCodecRegistry codecRegistry)
codecRegistry - codecRegistrypublic java.util.Optional<? extends ExecutableMethod<?,?>> findFirst()
LocalFunctionRegistryfindFirst in interface LocalFunctionRegistryExecutableMethod method representing the functionpublic java.util.Optional<? extends ExecutableMethod<?,?>> find(java.lang.String name)
LocalFunctionRegistryfind in interface LocalFunctionRegistryname - the nameExecutableMethod method representing the functionpublic java.util.Map<java.lang.String,java.net.URI> getAvailableFunctions()
LocalFunctionRegistrygetAvailableFunctions in interface LocalFunctionRegistrypublic <T> java.util.Optional<ExecutableMethod<java.util.function.Supplier<T>,T>> findSupplier(java.lang.String name)
LocalFunctionRegistrySupplier for the given name.findSupplier in interface LocalFunctionRegistryT - The typename - The nameOptional of a Supplierpublic <T> java.util.Optional<ExecutableMethod<java.util.function.Consumer<T>,java.lang.Void>> findConsumer(java.lang.String name)
LocalFunctionRegistryConsumer for the given name.findConsumer in interface LocalFunctionRegistryT - The typename - The nameOptional of a Consumerpublic <T,R> java.util.Optional<ExecutableMethod<java.util.function.Function<T,R>,R>> findFunction(java.lang.String name)
LocalFunctionRegistryFunction for the given name.findFunction in interface LocalFunctionRegistryT - The typeR - The result of the method callname - The nameOptional of a Functionpublic <T,U,R> java.util.Optional<ExecutableMethod<java.util.function.BiFunction<T,U,R>,R>> findBiFunction(java.lang.String name)
LocalFunctionRegistryBiFunction for the given name.findBiFunction in interface LocalFunctionRegistryT - The typeU - the type of the second argument to the functionR - The result of the method callname - The nameOptional of a BiFunctionpublic void process(BeanDefinition<?> beanDefinition, ExecutableMethod<?,?> method)
ExecutableMethodProcessorExecutableMethod that is annotated with the type parameter A.process in interface AnnotationProcessor<FunctionBean,ExecutableMethod<?,?>>process in interface ExecutableMethodProcessor<FunctionBean>beanDefinition - The bean definition to processmethod - The executable methodpublic java.util.Optional<MediaTypeCodec> findCodec(@Nullable MediaType mediaType)
MediaTypeCodecRegistryfindCodec in interface MediaTypeCodecRegistrymediaType - The MediaTypepublic java.util.Optional<MediaTypeCodec> findCodec(@Nullable MediaType mediaType, java.lang.Class<?> type)
MediaTypeCodecRegistryfindCodec in interface MediaTypeCodecRegistrymediaType - The MediaTypetype - The typepublic java.util.Collection<MediaTypeCodec> getCodecs()
getCodecs in interface MediaTypeCodecRegistry