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 |
| 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,
FunctionInvocationHelper<org.springframework.messaging.Message<?>> functionInvocationHelper) |
| Modifier and Type | Method and Description |
|---|---|
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
FunctionInvocationHelper<org.springframework.messaging.Message<?>> functionInvocationHelper)
public SimpleFunctionRegistry(org.springframework.core.convert.ConversionService conversionService,
org.springframework.messaging.converter.CompositeMessageConverter messageConverter,
JsonMapper jsonMapper)
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 © 2021 Pivotal Software, Inc.. All rights reserved.