Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cf-dev] Hooking into the acknowledgement of a observe notification

Hi

I'm implementing a resource endpoint based on the Observe example at

https://github.com/eclipse/californium/blob/master/demo-apps/cf-plugtest-server/src/main/java/org/eclipse/californium/plugtests/resources/Observe.java

Following that this example sets 

setObserveType(Type.CON);

i would expect notifications on resource changes to be acknowledged once the client has received them. The problem is that i cannot manage to understand if it's possible to hook into that acknoledgment in the server, so i can plug in my code once the server receives that acknowledgment.

Digging into the core code i suspect that  public void onAcknowledgement at

https://github.com/eclipse/californium/blob/8f6b7f00a461ed249a0997d13cced19e050c46c3/californium-core/src/main/java/org/eclipse/californium/core/network/stack/ObserveLayer.java#L192

has something to to with it, but i cannot find any example or test that shows me how to hook into that.

First time developing Javahere, so apologise if not using the right words, or asking something that is a Java question instead of a Californium question. Any answer will be apreaciated!

Thank you

Back to the top