Skip to content
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

Add support of polymorphic types #638

Closed
artem-v opened this issue Jul 18, 2019 · 5 comments
Closed

Add support of polymorphic types #638

artem-v opened this issue Jul 18, 2019 · 5 comments

Comments

@artem-v
Copy link
Contributor

artem-v commented Jul 18, 2019

Subj.

Consider to write header _type conditionally to the response message. For example it's possible to deduct that class in return type (or in @Response annotation) is abstract or interface and store this polymorphic indicator (e.g. boolean morph flag) in the MethodInfo.

@segabriel
Copy link
Member

segabriel commented Jul 18, 2019

IMHO we should delete this header (_type) at all.

@eutkin
Copy link

eutkin commented Jul 18, 2019

Could it allow a user to add custom codecs (which would take precedence over the default codec) for some complex cases?

@eutkin
Copy link

eutkin commented Jul 18, 2019

I learned that we can only have one argument in the service interfaces. What if we wrap all interface arguments in an array and pass an array of types or other information to decode?

@artem-v
Copy link
Contributor Author

artem-v commented Jul 18, 2019

@eutkin
see comment #639 (comment)

@artem-v
Copy link
Contributor Author

artem-v commented Jul 22, 2019

It's agreed it can be solved on encoder/decoder level. Closing.

@artem-v artem-v closed this as completed Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants