Open dstengle opened 9 years ago
It feels as if this is possible. Looking at @stonse talk on microservices, the ribbon example shows ribbon returning a typed object when the client is generated from a service interface. The mechanics of this are not clear, though.
The RxMovieProxyExample.java just deals in ByteBuf. Is this just unreleased code?
I just found this burried in there:
throw new ProxyAnnotationException(format("Method %s must return
RibbonRequest
So it seems like the current implementation only allows working with ByteBuf.
@elandau - you seem to be making recent commits. Is there any chance you can review?
@allenxwang - thoughts?
We are currently working on the improvements you mention. A more robust entity mapping and serialization framework will be taken care of as a separate project under rxnetty.
Awesome! We wil use Func1 until then. Is there a rough ETA? We are excited.
With the advent of ribbon 2.0, RestClient is now deprecated along with all of the convenient entity handling that it provided (after being listed as part of the 1.x roadmap and improvements in April. We're interested in the future, just pointing out the irony).
It appears that it could be possible to implement a generic JAXBContentTransformer / JacksonContentTransformer in order to get the request to handle the output transformation in a more generic way rather than writing a transformer class for every type.
What I can't see is any obvious way to handle the response. The ContentTransformer looks to be from the underlying rxnetty code and I don't see anything corresponding in the response objects to help with handling deserialization.
I realize that ribbon 2 is attempting to handle many different cases, but is there anything planned to try make this particular one easier to use?