-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Hi,
I'm using RPC with a type that uses generic types.
The RPC method looks something like:
public Result doCommand(Command command) {the Command class is as follows:
public class Command<D extends Data> extends SomethingSuper {
private String id;
//more fields here
private D data;When creating the server I register the types that are being used and register command as such:
MessagePack msgPack = new MessagePack();
msgPack.register(ImplementationForD.class);
msgPack.register(Command.class);and this conveniently creates a template object that handles correctly all the fields except for generic types D. I also register the implementations for types D.
When it comes to de-serialization msgpack picks up the field data as of type D for which it doesn't have any template that could be applied to read the value.
Please advise on how to solve this - if at all possible.
Metadata
Metadata
Assignees
Labels
No labels