public class SimpleFunctionRegistry extends Object implements FunctionRegistry, FunctionInspector
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.| Modifier and Type | Class and Description |
|---|---|
class |
SimpleFunctionRegistry.FunctionInvocationWrapper |
static class |
SimpleFunctionRegistry.PassThruFunction |
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
logger |
| Constructor and Description |
|---|
SimpleFunctionRegistry(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) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessageConverters(Collection<org.springframework.messaging.converter.MessageConverter> messageConverters)
Will add provided
MessageConverters to the head of the stack of the existing MessageConverters. |
protected boolean |
containsFunction(String functionName) |
Set<String> |
getNames(Class<?> type) |
FunctionRegistration<?> |
getRegistration(Object function) |
<T> T |
lookup(Class<?> type,
String functionDefinition,
String... expectedOutputMimeTypes) |
<T> void |
register(FunctionRegistration<T> registration) |
int |
size()
Return the count of functions registered in this catalog.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlookup, lookup, lookupgetInputType, getInputWrapper, getName, getOutputType, getOutputWrapper, isMessagepublic 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)
public SimpleFunctionRegistry(org.springframework.core.convert.ConversionService conversionService,
org.springframework.messaging.converter.CompositeMessageConverter messageConverter,
JsonMapper jsonMapper)
public void addMessageConverters(Collection<org.springframework.messaging.converter.MessageConverter> messageConverters)
MessageConverters to the head of the stack of the existing MessageConverters.messageConverters - list of MessageConverters.public FunctionRegistration<?> getRegistration(Object function)
getRegistration in interface FunctionInspectorpublic <T> T lookup(Class<?> type, String functionDefinition, String... expectedOutputMimeTypes)
lookup in interface FunctionCatalogpublic <T> void register(FunctionRegistration<T> registration)
register in interface FunctionRegistrypublic Set<String> getNames(Class<?> type)
getNames in interface FunctionCatalogpublic int size()
FunctionCatalogsize in interface FunctionCatalogprotected boolean containsFunction(String functionName)
Copyright © 2023 Pivotal Software, Inc.. All rights reserved.