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 of
FunctionRegistry
capable of discovering functions in BeanFactory
.- 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
ConstructorsConstructorDescriptionBeanFactoryAwareFunctionRegistry
(org.springframework.core.convert.ConversionService conversionService, org.springframework.messaging.converter.CompositeMessageConverter messageConverter, JsonMapper jsonMapper, FunctionProperties functionProperties, FunctionInvocationHelper<org.springframework.messaging.Message<?>> functionInvocationHelper) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
containsFunction
(String functionName) <T> T
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 Details
-
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 Details
-
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
- Specified by:
getNames
in interfaceFunctionCatalog
- Overrides:
getNames
in classSimpleFunctionRegistry
-
lookup
- Specified by:
lookup
in interfaceFunctionCatalog
- Overrides:
lookup
in classSimpleFunctionRegistry
-
containsFunction
- Overrides:
containsFunction
in classSimpleFunctionRegistry
-