Class SimpleFunctionRegistry
java.lang.Object
org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry
- All Implemented Interfaces:
FunctionCatalog,FunctionRegistry
- Direct Known Subclasses:
BeanFactoryAwareFunctionRegistry
Implementation of
FunctionCatalog and FunctionRegistry which
does not depend on Spring's BeanFactory.
Each function must be registered with it explicitly to benefit from features
such as type conversion, composition, POJO etc.- Author:
- Oleg Zhurakousky, Roman Samarev, Soby Chacko
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassstatic class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSimpleFunctionRegistry(org.springframework.core.convert.ConversionService conversionService, org.springframework.messaging.converter.CompositeMessageConverter messageConverter, JsonMapper jsonMapper) SimpleFunctionRegistry(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 TypeMethodDescriptionvoidaddMessageConverters(Collection<org.springframework.messaging.converter.MessageConverter> messageConverters) Will add providedMessageConverters to the head of the stack of the existing MessageConverters.protected booleancontainsFunction(String functionName) <T> T<T> voidregister(FunctionRegistration<T> registration) intsize()Return the count of functions registered in this catalog.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.cloud.function.context.FunctionCatalog
lookup, lookup, lookup
-
Field Details
-
logger
protected org.apache.commons.logging.Log logger
-
-
Constructor Details
-
SimpleFunctionRegistry
public SimpleFunctionRegistry(org.springframework.core.convert.ConversionService conversionService, org.springframework.messaging.converter.CompositeMessageConverter messageConverter, JsonMapper jsonMapper, @Nullable FunctionProperties functionProperties, @Nullable FunctionInvocationHelper<org.springframework.messaging.Message<?>> functionInvocationHelper) -
SimpleFunctionRegistry
public SimpleFunctionRegistry(org.springframework.core.convert.ConversionService conversionService, org.springframework.messaging.converter.CompositeMessageConverter messageConverter, JsonMapper jsonMapper)
-
-
Method Details
-
addMessageConverters
public void addMessageConverters(Collection<org.springframework.messaging.converter.MessageConverter> messageConverters) Will add providedMessageConverters to the head of the stack of the existing MessageConverters.- Parameters:
messageConverters- list ofMessageConverters.
-
lookup
- Specified by:
lookupin interfaceFunctionCatalog
-
register
- Specified by:
registerin interfaceFunctionRegistry
-
getNames
- Specified by:
getNamesin interfaceFunctionCatalog
-
size
public int size()Description copied from interface:FunctionCatalogReturn the count of functions registered in this catalog.- Specified by:
sizein interfaceFunctionCatalog- Returns:
- the count of functions registered in this catalog
-
containsFunction
-