Added initial support for lazy style FunctionCatalog/Registry which:

-  does not rely on any of the existing wrappers and instead relies on internal wrapper which performs  in-flight/just-in-time wrapping and unwrapping from reactive to imperative types
- performs transparent type conversion relying on MessageConverters and ConversionService
- supports multiple inputs/outputs
This commit is contained in:
Oleg Zhurakousky
2019-06-05 08:24:49 +02:00
parent 85af2e4ed6
commit 93f7a248a5
20 changed files with 1830 additions and 55 deletions

View File

@@ -130,9 +130,10 @@ class FunctionCreatorConfiguration {
if (this.properties.getName().contains("|")) {
// A composite function has to be explicitly registered before it is
// looked up because we are using the SingleEntryFunctionRegistry
this.registry.lookup(Consumer.class, this.properties.getName());
this.registry.lookup(Function.class, this.properties.getName());
this.registry.lookup(Supplier.class, this.properties.getName());
// Object o = this.registry.lookup(Consumer.class, this.properties.getName());
// o = this.registry.lookup(Function.class, this.properties.getName());
// o = this.registry.lookup(Supplier.class, this.properties.getName());
// System.out.println();
}
}
catch (Exception e) {
@@ -635,6 +636,9 @@ class FunctionCreatorConfiguration {
registration.type(FunctionType.of(bean.getClass()).getType());
}
registration.target(bean);
if (registration.getType() == null) {
registration.type(FunctionType.of(bean.getClass()).getType());
}
FunctionCreatorConfiguration.this.registry.register(registration);
}