Hi
Currently
I am working on proof of concept using Leshan to
recieve log messages from devices on regular
basis. We found that Observe request is the best
way to go for this approach.
So temporarily, since we don't have a custom
object yet(Wakama client not ready yet), on the
server side when the client registers, I observe
resource 15 on Device in LeshanClientExample.
Here is the Observe code in LeshanServer.java:
this.clientRegistry.addListener(new
ClientRegistryListener() {
....
@Override
public void registered(final Client
client) {
// TODO observe the client when it is
registered.
observeResource(client);
}
....
private
void observeResource(final Client client){
ObserveRequest request = new
ObserveRequest("/3/0/15");
LwM2mResponse cResponse =
this.send(client, request);
}
Next
I want to capture the change everytime there is a
change in the resource and record in a database. I
see that in ObjectResource I get content that was
updated (in handleGET()). Is that the correct
place to retrieve updates from ?
I am trying to find out where in the codebase is
the correct place to retrieve updated content ?
Your help will be highly appreciated.
Thanks
J.