Class BeanFactoryAwareFunctionRegistry
- java.lang.Object
-
- org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry
-
- org.springframework.cloud.function.context.catalog.BeanFactoryAwareFunctionRegistry
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,FunctionInspector,FunctionCatalog,FunctionRegistry,org.springframework.context.ApplicationContextAware
public class BeanFactoryAwareFunctionRegistry extends SimpleFunctionRegistry implements org.springframework.context.ApplicationContextAware
Implementation ofFunctionRegistrycapable of discovering functions inBeanFactory.- Author:
- Oleg Zhurakousky
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry
SimpleFunctionRegistry.FunctionInvocationWrapper, SimpleFunctionRegistry.PassThruFunction
-
-
Field Summary
-
Fields inherited from class org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry
logger
-
-
Constructor Summary
Constructors Constructor Description BeanFactoryAwareFunctionRegistry(org.springframework.core.convert.ConversionService conversionService, org.springframework.messaging.converter.CompositeMessageConverter messageConverter, JsonMapper jsonMapper, FunctionProperties functionProperties, FunctionInvocationHelper<org.springframework.messaging.Message<?>> functionInvocationHelper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancontainsFunction(String functionName)Set<String>getNames(Class<?> type)<T> Tlookup(Class<?> type, String functionDefinition, String... expectedOutputMimeTypes)voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)intsize()Return the count of functions registered in this catalog.-
Methods inherited from class org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry
addMessageConverters, getRegistration, register
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.springframework.cloud.function.context.FunctionCatalog
lookup, lookup, lookup
-
Methods inherited from interface org.springframework.cloud.function.context.catalog.FunctionInspector
getInputType, getInputWrapper, getName, getOutputType, getOutputWrapper, isMessage
-
-
-
-
Constructor Detail
-
BeanFactoryAwareFunctionRegistry
public BeanFactoryAwareFunctionRegistry(org.springframework.core.convert.ConversionService conversionService, org.springframework.messaging.converter.CompositeMessageConverter messageConverter, JsonMapper jsonMapper, @Nullable FunctionProperties functionProperties, @Nullable FunctionInvocationHelper<org.springframework.messaging.Message<?>> functionInvocationHelper)
-
-
Method Detail
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
size
public int size()
Description copied from interface:FunctionCatalogReturn the count of functions registered in this catalog.- Specified by:
sizein interfaceFunctionCatalog- Overrides:
sizein classSimpleFunctionRegistry- Returns:
- the count of functions registered in this catalog
-
getNames
public Set<String> getNames(Class<?> type)
- Specified by:
getNamesin interfaceFunctionCatalog- Overrides:
getNamesin classSimpleFunctionRegistry
-
lookup
public <T> T lookup(Class<?> type, String functionDefinition, String... expectedOutputMimeTypes)
- Specified by:
lookupin interfaceFunctionCatalog- Overrides:
lookupin classSimpleFunctionRegistry
-
containsFunction
protected boolean containsFunction(String functionName)
- Overrides:
containsFunctionin classSimpleFunctionRegistry
-
-