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 ofFunctionRegistry
capable 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 boolean
containsFunction(String functionName)
Set<String>
getNames(Class<?> type)
<T> T
lookup(Class<?> type, String functionDefinition, String... expectedOutputMimeTypes)
void
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
int
size()
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:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
size
public int size()
Description copied from interface:FunctionCatalog
Return the count of functions registered in this catalog.- Specified by:
size
in interfaceFunctionCatalog
- Overrides:
size
in classSimpleFunctionRegistry
- Returns:
- the count of functions registered in this catalog
-
getNames
public Set<String> getNames(Class<?> type)
- Specified by:
getNames
in interfaceFunctionCatalog
- Overrides:
getNames
in classSimpleFunctionRegistry
-
lookup
public <T> T lookup(Class<?> type, String functionDefinition, String... expectedOutputMimeTypes)
- Specified by:
lookup
in interfaceFunctionCatalog
- Overrides:
lookup
in classSimpleFunctionRegistry
-
containsFunction
protected boolean containsFunction(String functionName)
- Overrides:
containsFunction
in classSimpleFunctionRegistry
-
-