Commit Graph

1817 Commits

Author SHA1 Message Date
Marius Bogoevici
4a1972dcf1 Add conversion support for Stream 2017-04-25 08:28:38 +01:00
Dave Syer
4686e450b1 Alternative approach to MVC handling
Doesn't rely on manipulating the FunctionCatalog, and does type
conversion/coercion in the MVC layer.
2017-04-24 16:31:09 +01:00
Dave Syer
5055369cb5 Fix prefix issue 2017-04-24 16:31:09 +01:00
Dave Syer
b80ce1fb3e Update to latest reactor 2017-04-19 10:23:24 +01:00
Dave Syer
36c6b2dba7 Update versions of boot things 2017-04-12 17:57:28 +01:00
Marius Bogoevici
70dff6bb6b Enable JSON conversion for non-Flux functions
- use ProxyWrapper around a FluxConsumer as well
  making it consistent with the behaviour of Flux
  functions
- Enable introspection for scanned beans
- Fix failing tests by passing JSON string as input messages
  (marshalled form expected from the binder)
2017-04-06 08:24:51 +01:00
Dave Syer
d1cf9b47a4 Add some failing tests 2017-04-05 13:40:24 +01:00
Dave Syer
d67159729d Add support for explicit FunctionRegistration
A bean of type FunctionRegistration registers the function with
user-specified name and other properties, rather than relying on the
bean name.

Alternatively, function catalog keys can be specified as a
@Qualifier, which will be used instead of the bean name if
no registration is found.
2017-04-04 10:24:54 -04:00
Marius Bogoevici
82e19894b2 Add stream-function tests 2017-04-04 00:25:12 -04:00
markfisher
d208b5e0f3 stream consumer invoker target now expects Flux 2017-03-31 12:09:04 -04:00
markfisher
0b49edc2fd polishing 2017-03-31 11:43:28 -04:00
Dave Syer
3b598bd10c Break up comments in javadocs 2017-03-31 09:58:24 -04:00
Dave Syer
cea87fb8c0 Include cause in rethrown exception 2017-03-31 09:58:24 -04:00
Dave Syer
4346a7adc8 Re-use get, post, put etc. in overloaded methods 2017-03-31 09:58:24 -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
07c9d1c460 Remove unused method parameter 2017-03-31 13:56:25 +01:00
Dave Syer
38dcbaffff Add test for priority of looking up supplier in GET mapping 2017-03-31 13:48:36 +01:00
Dave Syer
cadd5546da Add custom HandlerMapping to allow more flexible request mapping 2017-03-31 13:44:11 +01:00
Dave Syer
787ab65d55 On POST to a Consumer, reflect input and send 202 2017-03-30 16:42:19 +01:00
Dave Syer
0d08735dda Test POST to Consumer
See gh-36
2017-03-30 16:42:19 +01:00
Dave Syer
8aefd9b472 Make rest template builder optional 2017-03-30 16:42:02 +01:00
Dave Syer
5162e6b149 Add gateway library for building micro-proxies 2017-03-27 10:42:05 +01:00
markfisher
98c2ca76f5 avoid Supplier NPE 2017-03-18 21:38:08 -04:00
Dave Syer
da013c1015 Purge warnings in IDE 2017-03-14 18:21:41 +00:00
Dave Syer
915ff401be Make GET /{function}/{value} single valued (Mono)
When the user has sent us a single value, we can make the signature
of the handler and the format of the HTTP response much more
natural if it is single valued too (i.e. a Mono).
2017-03-13 15:01:10 +00:00
Dave Syer
9b24d23df8 Add configurable base path for web resources 2017-03-13 13:43:26 +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
Dave Syer
5ace9b764b Resort to reflection if the function is not a @Bean
Beans that are not created from a @Bean factory method do not have
the same kind of metadata. This change uses relection to extract
the target type from the bean definition if all else fails.
2017-03-10 17:40:05 +00:00
Dave Syer
2ee97721ab Support HTTP GET of single value value Function
E.g. a Function<Long, Foo> can be used to fetch a single entity of
type Foo with a long ID., via /{function}/{id}
2017-03-10 16:33:34 +00:00
Dave Syer
17b644f563 If HTTP client asks for JSON, then time out the response
An HTTP response does not have to be an infinite stream, and in fact
life is simpler if it is not. The timeout in the web wrappers can
be used to close the response and return normally to a client
that has been waiting more than (say) 1s, instead of treating
it as an error condition.

Error handling is still kind of unsolved.
2017-03-09 16:10:08 +00:00
Dave Syer
ec097a563d Tweak SSE emitter a bit so that it handles empty responses
An empty response should either be empty or complete JSON. I went
for the latter.
2017-03-08 15:02:35 +00:00
Dave Syer
0c4dcfaf72 Fix bug in response when JSON is empty 2017-03-07 16:54:34 +00:00
markfisher
6044b053ae renamed property keys 2017-03-03 16:35:30 -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
Dave Syer
22cab6a3f1 Upgrade to stable thin launcher 1.0.0.M2 2017-02-24 17:01:32 +00:00
Dave Syer
bcef4e1600 Remove unused property 2017-02-24 16:58:52 +00:00
Dave Syer
fa86e5fb1f Update reactor versions 2017-02-24 10:07:01 +00:00
Dave Syer
d6a4ccf001 Update thin launcher to snapshot for fixes 2017-02-23 14:50:48 +00:00
markfisher
b4c37f7828 added FunctionScan annotation 2017-02-20 12:20:42 -05:00
markfisher
ab8fd05367 update README 2017-02-13 09:45:39 -05:00
markfisher
d8e51dbb6e renamed bytecode resource property 2017-02-13 09:42:22 -05:00
markfisher
5939f96016 renaming stream function property 2017-02-13 09:23:41 -05:00
markfisher
e11bd261ab add function chain support to stream.sh 2017-02-08 10:37:48 -05:00
markfisher
e65641dbb8 removed bytecode loading sample 2017-02-07 14:20:55 -05:00
markfisher
62aecb9c7b update web.sh and README 2017-02-07 14:16:54 -05:00
markfisher
9eb3b033d3 update stream.sh script 2017-02-07 13:29:53 -05:00
markfisher
f20cff0fc8 added FunctionProxyApplicationListener
added support for lambda compiling Supplier and Consumer proxies
2017-02-06 15:56:51 -05:00
markfisher
0a6dce951b add support for function composition 2017-02-06 15:55:53 -05:00