Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cf-dev] Serializing/de-serializing CoAPExchange object chain

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

 

 

 

 

 

 

 


This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.

Back to the top