Commit Graph

100 Commits

Author SHA1 Message Date
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
markfisher
2075c649a5 add null check in FunctionController 2017-02-06 15:41:19 -05:00
markfisher
9a5600f259 add support for compiling suppliers and consumers 2017-02-06 15:29:17 -05:00
markfisher
d7a33055d8 update stream version to Brooklyn SR2 2017-02-02 11:22:18 -05:00
Dave Syer
cab48a17f2 Update thin launcher to 1.0.0.M1 2017-01-31 15:35:03 +00:00
Dave Syer
68e83c4bba Update poms to latest Boot and thin launcher 2017-01-31 14:22:31 +00:00
markfisher
76c6b7b5f4 excluding deployer module from build temporarily 2017-01-27 17:54:34 -05:00
markfisher
4dbad37334 explicit Reactor version for compiler app 2017-01-27 16:40:35 -05:00
markfisher
e389560967 make constructor arg MediaType property final 2017-01-23 08:44:58 -05:00
Dave Syer
425be34b98 Send content type to web response if available 2017-01-23 09:37:02 +00:00
markfisher
896139ba67 minor README updates 2017-01-20 15:07:22 -05:00
Dave Syer
946f4a3bf3 Fix HTTP responses that caller asked to be JSON
If caller says he accepts application/json we need to be sure that
we send an array. That wasn't quite working and hadn't been tested.
2017-01-20 13:54:23 -05:00
markfisher
8e3370b717 minor README edits 2017-01-20 13:51:00 -05:00
Dave Syer
ac5804ae34 Update README with details of @Beans etc. 2017-01-20 17:35:59 +00:00
Dave Syer
bc90b9affb Add stream sample to POJO app 2017-01-20 13:12:41 +00:00
Dave Syer
452106f287 Fix some logic with media types
If user sends "Accept: */*" we don't want to default to sending
an SSE (for instance). So the logic for detecting those preferences
has to take MediaType.ALL into account as a special case.
2017-01-20 13:10:57 +00:00
markfisher
f709a4e08a updated stream script for supplier and consumer 2017-01-19 17:17:01 -05:00
markfisher
94a78bdc7f add Function compiling webapp and update scripts 2017-01-19 15:55:49 -05:00