Commit Graph

455 Commits

Author SHA1 Message Date
Oleg Zhurakousky
6093aefe14 GH-422, GH-606 Fix attributes generatioin 2020-11-16 14:20:02 +01:00
Oleg Zhurakousky
ac54a83e09 Clean up and simplifications around CloudEvent processing
This commit effectively a merge of work with #607 and simplifies the following
- CloudEventAttributesProvider now provides CloudEventAttributes initialized with defaults to be set by the user
- In HTTP RequestProcessor the logic of sanitizing headers was improved to ensure that correct prefix is applied

Resolves #607
2020-11-16 13:40:53 +01:00
Oleg Zhurakousky
a0208ceadd Made RequiredAttributeAccessor constructor public
Related to #422,606
2020-11-16 12:25:48 +01:00
Oleg Zhurakousky
ada16079ca GH-422 GH-606 Add support for normalizing structure-mode CE message
Normalizing in this context means converting it to binary-mode so the rest of the processing logic is the same.
Added support for canonical attribute names. Now, internally any attribute can be set as 'ce_' regardless where it came from are where it goes to as the frameork will be able to recognize both
Removed CloudEventMessageConverter
Renamed CloudEventAttributes to CloudEventAttributesHelperas it is better suited to what it actually does
2020-11-16 12:06:33 +01:00
Oleg Zhurakousky
c31b7f1f20 Make CloudEventAttributesProvider a FunctionalInterface
Related to #422 and #606
2020-11-16 08:41:42 +01:00
Oleg Zhurakousky
311649c312 Fix CloudEvent prefix and fix the name of CloudEventAttributesProvider.java 2020-11-13 16:07:33 +01:00
Oleg Zhurakousky
e627aa1a28 fix styles 2020-11-13 11:43:31 +01:00
Oleg Zhurakousky
784fde2e1f GH-606 add initila support for generating default cloud event attributes 2020-11-13 11:39:48 +01:00
Oleg Zhurakousky
9c58e6d64b GH-422 GH-606 Add support for simplifying message headers to attribute mapping
Added CloudEventAttributesProvider and default implementation
Added CloudEventMessageUtils
2020-11-13 10:24:27 +01:00
Oleg Zhurakousky
f999cdd787 GH-422 Formalize Cloud Event conversion strategy to consistently handle binary-mode and structured-mode cloud events
Moved CloudEvent related artifacts to ‘cloud events’ package with hopes to eventually donating it to CNCF SDK
Created CloudEventUtils identifying necessary constants and utility methods
2020-11-12 17:01:42 +01:00
Oleg Zhurakousky
a39476561a GH-422 Add RabbitMQ instructions for Cloud Events interaction 2020-11-11 11:53:39 +01:00
Oleg Zhurakousky
a6eb8339a5 GH-422 Improvements in cloud event samples
Added initial README
Polished tests
2020-11-11 09:18:51 +01:00
Oleg Zhurakousky
2a88b52ca1 GH-422 Add initial set of Cloud Event samples
This commit adds initial set of samples and tests demonstrating various ways of how cloud event can be consumed (i.e., structured, bindary, pojo etc)
2020-11-10 16:29:30 +01:00
Oleg Zhurakousky
8a032e7ed9 GH-422 Initial support for CloudEvents
Added initial implementation of MessageConverter
At the moment there seem that MessageConverter(s) would be the only thing needed to integrate Cloud Events with various elements of Spring
2020-11-10 14:50:09 +01:00
Oleg Zhurakousky
43e1651527 GH-592 Logging improvements
Resolves #592
2020-11-09 20:06:13 +01:00
Oleg Zhurakousky
3cea0343df PR-605 less formatting
Resolves #605
2020-11-09 16:16:23 +01:00
Oleg Zhurakousky
8774383dc8 GH-601 add test to validate the issue is fixed
Resolves #601
2020-11-09 15:35:35 +01:00
Oleg Zhurakousky
9b325ce7e6 GH-602 Ensure collections with converted items are not converted again
Resolves #602
2020-11-09 14:07:20 +01:00
Oleg Zhurakousky
dd0f70bc8e Simplify logic around getting item type of a function type 2020-11-04 11:29:01 +01:00
Oleg Zhurakousky
1209fa1053 Additional clean up and polishing 2020-11-04 10:43:29 +01:00
Oleg Zhurakousky
e95279daae Polish to fix build 2020-11-03 15:38:27 +01:00
Oleg Zhurakousky
9a715be835 Initial refactoring and simplificatioin of web module 2020-11-03 13:46:52 +01:00
Oleg Zhurakousky
9b1206f6af Fix SmartCompositeMessageConverter to ensure it properly injects contentType
Initial refactoring web - test pass
2020-11-03 13:44:45 +01:00
Oleg Zhurakousky
0e322e1607 Add special handling for GenericArrayType 2020-10-27 14:36:33 +01:00
Oleg Zhurakousky
7a7d819d1d Fix type resolution for wild card types 2020-10-27 13:52:42 +01:00
Oleg Zhurakousky
411611a2cd Consolidate logic for extracting original input from input holder 2020-10-27 09:39:30 +01:00
Oleg Zhurakousky
7c860eb334 Re-enable support for around advise 2020-10-26 08:29:16 +01:00
Oleg Zhurakousky
3b199d723a Add skipInput/Output conversion attributes to FunctionInvocationWrapper 2020-10-23 17:19:32 +02:00
Oleg Zhurakousky
55bee80e0b Ensure input headers are propagated the same way in reactive functions as they are in imperative 2020-10-23 16:11:24 +02:00
Oleg Zhurakousky
dc8d51b873 Consolidate mechanisms around retaining headers and skipping input/output conversion 2020-10-23 13:19:03 +02:00
Oleg Zhurakousky
6b96fa87e7 Fix comment 2020-10-22 10:02:21 +02:00
Oleg Zhurakousky
f1bdae79fc Add function type discovery method to FunctionTypeUtils 2020-10-22 09:58:34 +02:00
Oleg Zhurakousky
544e35335a GH-596 Add support for handling conversion of complex types
Resolves #596
2020-10-21 14:36:50 +02:00
Oleg Zhurakousky
8e24f3ae7a Add FunctionInspector back to SimpleFunctionRegistry
Even though it is deprecated and SimpleFunctionRegistry will throw UnsupportedOperationException in case getRegistration() methid is called we need to re-enable it temporarily to mitigate breaking API changes
2020-10-20 15:39:57 +02:00
Oleg Zhurakousky
e47fc2d5cf Disconnect FunctionInspector from adapter request handlers and Kotlin module 2020-10-20 13:58:51 +02:00
Oleg Zhurakousky
b8d462678a Deprecate and remove all usages of FunctionInspector 2020-10-19 18:11:11 +02:00
Oleg Zhurakousky
10b1f808ba Consolidate isMessage() operation 2020-10-19 14:57:55 +02:00
Oleg Zhurakousky
14918ebf16 Clean up FunctionTypeUtils 2020-10-19 14:44:37 +02:00
Oleg Zhurakousky
9a910688b1 Deprecate Flux* function interfaces 2020-10-19 13:20:51 +02:00
Oleg Zhurakousky
72f05fc591 Refactor FunctionCatalog implementation 2020-10-16 17:59:06 +02:00
buildmaster
85f70f30a6 Going back to snapshots 2020-10-02 09:22:55 +00:00
buildmaster
bd05ea44cf Update SNAPSHOT to 3.1.0-M4 2020-10-02 09:20:53 +00:00
David Turanski
852cdd5d5e Fix get() conditional return
Resolves #591
2020-09-28 11:18:56 +02:00
buildmaster
ed13099779 Going back to snapshots 2020-09-23 14:34:33 +00:00
buildmaster
861e4611b1 Update SNAPSHOT to 3.1.0-M3 2020-09-23 14:32:21 +00:00
Oleg Zhurakousky
7aa0e00f8b Remove commented code 2020-09-21 17:24:52 +02:00
Oleg Zhurakousky
4d49b4d6ec GH-568 Add support for casting resulting function as Runnable
Resolves #568
2020-09-21 17:22:38 +02:00
Oleg Zhurakousky
6863931f30 GH-578 Fix FunctionRegistration lookup
The root of the issue was in implementation of  equals() and hashCode() of FunctionInvocationWrapper

Resolves #578
2020-09-21 15:22:21 +02:00
Oleg Zhurakousky
3115833c88 GH-588 Fix dropped headers during input conversion
This addresses the issue of dropped Message headers in the event where input is a Message but input conversion is not necessary
while Message contains headers that require explicit propagation (e.g., scf-sink-url, scf-func-name)

Resolves #588
2020-09-18 18:46:52 +02:00
Oleg Zhurakousky
e19ed2ff68 GH-587 Add support for inferring 'accept' content type for simple types
This fix also introduces new Function property 'accept' with no default value which implicitely would default to application/json unless the output type of the function is String at which point it would default to text/plain. However, if it was explicitely set in FunctionProperties it will be used regardless of the function output type.
Resolves #587
2020-09-16 18:14:40 +02:00