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, 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, Soby Chacko
-
Nested Class Summary
Nested classes/interfaces inherited from class SimpleFunctionRegistry
SimpleFunctionRegistry.FunctionInvocationWrapper, SimpleFunctionRegistry.PassThruFunction -
Field Summary
Fields inherited from class SimpleFunctionRegistry
logger -
Constructor Summary
ConstructorsConstructorDescriptionBeanFactoryAwareFunctionRegistry(org.springframework.core.convert.ConversionService conversionService, org.springframework.messaging.converter.CompositeMessageConverter messageConverter, JsonMapper jsonMapper, FunctionProperties functionProperties, org.springframework.cloud.function.core.FunctionInvocationHelper<org.springframework.messaging.Message<?>> functionInvocationHelper) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancontainsFunction(String functionName) <T> TvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) intsize()Return the count of functions registered in this catalog.Methods inherited from class SimpleFunctionRegistry
addMessageConverters, registerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FunctionCatalog
lookup, lookup, lookup
-
Constructor Details
-
BeanFactoryAwareFunctionRegistry
public BeanFactoryAwareFunctionRegistry(org.springframework.core.convert.ConversionService conversionService, org.springframework.messaging.converter.CompositeMessageConverter messageConverter, JsonMapper jsonMapper, @Nullable FunctionProperties functionProperties, @Nullable org.springframework.cloud.function.core.FunctionInvocationHelper<org.springframework.messaging.Message<?>> functionInvocationHelper)
-
-
Method Details
-
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
- Specified by:
getNamesin interfaceFunctionCatalog- Overrides:
getNamesin classSimpleFunctionRegistry
-
lookup
- Specified by:
lookupin interfaceFunctionCatalog- Overrides:
lookupin classSimpleFunctionRegistry
-
containsFunction
- Overrides:
containsFunctionin classSimpleFunctionRegistry
-