Hi
We use leshan and californium projects for implementing LwM2M in our platform. What I want to try is to decouple the CoAP and LwM2M implementation in Leshan.
For this I was trying to see if I can serialize the CoAPExchange object and send to over the network to the VM where the Leshan/LwM2M will be implemented.
The challenge I am facing is to serialize and de-serialize the CoAPExchange object as many of the classes in the object chain do not have the default constructor.
BTW I am using a XML serialize.
Does anyone have a solution of how we can serialize/de-serialize objects whose classes do not implement the default constructor. After googling a bit , most of the solutions were around writing convertors, extending
the classes or writing adapters. I do not want to write code for extending or adapting the classes as I will have to maintain this code whenever there are new version of CoAP.
Question: Can we add the default constructors to the CoAPExchange object chain so that marshaling and un-marshaling would be easy?
If we can add the default constructs or make the object serializable I can go ahead and contribute these changes to the repository.
Please advise.
Regards,
Vinay