Commit Graph

33 Commits

Author SHA1 Message Date
Dave Syer
e824fbf6cb Isolate the context class loader if function appears to need it
When a function is created using an isolated class loader it might
want to use that class loader again for its invocations, and a lot
of tools (Spring etc.) use the context class loader for that kind
of thing if they don't have an explicit default value. So we
set the context class loader before, and unset it after, the
function invocation using a convenience wrapper.
2017-11-25 05:25:29 +09:00
Dave Syer
219d056801 Add FunctionRegistry interface (writable FunctionCatalog)
This makes dynamic function registration (after context starts) much
easier. Also frees us from having to employ BeanFactoryPostProcessor
and other tricks to get the functions registered on startup.
2017-11-13 14:13:59 +00:00
Dave Syer
af8b6e253e Revert to snapshots 2017-09-15 17:49:31 +01:00
Dave Syer
858b7404c6 Update to 1.0.0.M1 2017-09-15 17:48:51 +01:00
Dave Syer
3ccb925733 Merge core packages into one 2017-09-15 17:10:00 +01:00
markfisher
dce30023e8 remove unused code 2017-09-15 11:36:46 -04:00
Dave Syer
472f0e31b6 Prune dependencies and rename samples 2017-09-15 13:44:55 +01:00
Dave Syer
61a902ce9a Add spring-cloud-function-dependencies and use it throughout 2017-09-15 09:34:44 +01:00
Oleg Zhurakousky
a973b678f1 FunctionUtils polishing
- attempted to make code more functional (eat our own dog food) and concise
- addressed PR comment
- additional cleanup/polishing of FunctionUtils and related classes
- Removed Function/Supplier/ConsumerProxy classes by extending type info on their super interface
- Renamed FunctionUtils to FunctionFactoryUtils
- Added javadoc to FunctionFactoryUtils to explain its design considerations as well as what it can and can not doi

Fixes gh-90
2017-08-22 14:07:42 +01:00
Dave Syer
da0c954135 Add get*Names() to FunctionCatalog
We could go wit a separate interface, but it seems sensible to
keep it together really, so that callers don't have to downcast.
2017-06-29 14:43:19 +01:00
Dave Syer
99c7b995e0 Add FunctionFactoryMetadata interface for type discovery
The compiled functions implement that interface which means you can inspect
the signature of the method that created them and discover its
generic types.
2017-05-26 10:09:47 +01:00
markfisher
5a7c95bd97 add type info for compiled functions 2017-05-25 12:38:54 -04:00
Dave Syer
5589804d2c Add support for single valued Supplier as well 2017-05-24 11:00:32 +01:00
Dave Syer
0d2418a47b Add "wrapper" type methods to FunctionInspector
These can be used to more reliably discover whether the user
has declared a function with flux types or "bare" POJOs. They
then pave the way to supporting single valued types in a special
way.

Also consolidate and simplify the logic in FunctionInspector
2017-05-24 09:10:46 +01:00
markfisher
0b49edc2fd polishing 2017-03-31 11:43:28 -04:00
Dave Syer
2b88eaeb08 Extend support for simple types to Consumer and Supplier
The function catalog now always wraps beans that deal with non-flux
generic types.
2017-03-31 14:08:35 +01:00
Dave Syer
da013c1015 Purge warnings in IDE 2017-03-14 18:21:41 +00:00
Oleg Zhurakousky
2a0653b0e7 Removed redundant entries from POM files
Polished POM files to remove redundant entries that were causing warnings in the IDE. Some notable changes are:
- Removed spring-boot.version from sample project as they inherit it from the parent
- Removed versioning for maven-jar-plugin (was 3.0) from multiple project so it relies on the managed version
- Removed java.version from all spring-cloud-function-* modules as they inherit the one from parent.

Addressed PR comments
- removed references to maven-jar-plugin
2017-03-11 18:31:32 -05:00
markfisher
2ae7789cd1 add interval for non-Flux stream Suppliers 2017-03-02 11:13:01 -05:00
markfisher
1dc0489c23 introspect bean definition for Flux types
non-Flux Functions wrapped during auto-config
2017-03-02 10:53:21 -05:00
markfisher
19fd056a5e add support for simple (non-Flux) types
add objectToStringHttpMessageConverter

CompilerController accepts parameterized types
2017-02-24 12:14:57 -05:00
markfisher
cc3bb8f645 renamed ApplicationContextFunctionCatalog 2017-01-13 10:45:07 -05:00
markfisher
0fb31d6d2b removed FunctionRegistry 2017-01-11 21:23:02 -05:00
markfisher
cfd416590d removing FileSystemFunctionRegistry 2017-01-11 20:59:18 -05:00
markfisher
69fc017565 added LambdaCompilingFunction 2017-01-11 20:30:25 -05:00
Dave Syer
9321dc7311 Remove function composition from the catalog interface
Should be easy enoug hto add back later, but it was causing issues
with type conversion where we are npot yet sophisticated enough
to chain functions together and keep track of the types being
passed between them.
2017-01-10 12:37:29 -05:00
Dave Syer
c6736f959b Add a sample app with just beans that are Functions
Make it deployable via its maven coordinates in
spring-cloud-function-deployer (it is deployed by default on start
up right now, but that's just a demo)
2017-01-03 15:16:13 +00:00
markfisher
b0db0233be add support for Supplier and Consumer 2016-10-14 20:40:48 -04:00
markfisher
44704d43d8 avoid duplicate linkage errors 2016-10-01 21:31:04 -04:00
markfisher
b78024e7ea generate name per function to allow composition 2016-10-01 16:32:28 -04:00
markfisher
309993f0d4 file-based registry for serialized functions 2016-10-01 15:30:25 -04:00
markfisher
cd9c311326 refactoring
* extracted FunctionGateway interface
* renamed current implementation to LocalFunctionGateway
* moved `compose` methods from FunctionGateway to FunctionRegistry
2016-09-22 08:31:42 -04:00
markfisher
bdd39b74ff initial commit 2016-09-21 22:33:06 -04:00