-
Notifications
You must be signed in to change notification settings - Fork 166
[WIP] Allow POJOs as CloudEvent data, round 2 #208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Allow POJOs as CloudEvent data, round 2 #208
Conversation
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
|
The #198 has suggested a couple of approaches of adding additional functionality to core strategies - approaches that are intuitive and widely used in many java frameworks. So I am not sure why do keep on insisting doing something completely different. . .?? At the very least, please, please, please, don't call it |
You're free to contribute with a PR, in order to propose a solution that you think might fit the needs discussed in #196 and #198 |
|
My comments were simply meant to address the issues I see with the current PR, but I certainly appreciate the invitation to collaborate. . . As suggested in #198, by several people, all you need to do is define additional method(s) on Basically remove In it's current state my vote (if counts) is -1 |
|
I think we still need a new interface for that if a 3rd party implementer wants to use the features of core, and actually no name is better than |
I am sure there are 10s of other suitable names, but naming it Since the need for this interface is questionable anyways, let's at least not repeat the same mistake with clashing names. |
|
None of the names you discuss really makes sense IMO, because the Hence my proposal in #211, relax the |
You should not forget that you're dealing with Java, where certain restrictions apply that you have to deal with.
If not the payload, what else can be typed? The whole |
|
One naming pattern that could serve as viable compromise and the one that is widely used is |
|
Replaced by #250 |
Fix #196 and follow up from discussions in #198
In this second iteration I've created a new
CloudEventinterface in core that extends the one inapi. This interface addsgetRawData()This interface is used mostly everywhere in core and that's what the user of the sdk should use too (leaving the one in api mostly for integration needs), but always paying attention to support the parentCloudEventwhen possible.As in #198, I had to change the reader/writer interface and I added
EventDataCodecbut only with serialization support, deserialization of data is out of the scope of this PR (and of this project too)Signed-off-by: Francesco Guardiani francescoguard@gmail.com