Hi Lino,
as mentioned in issue
https://github.com/eclipse/californium/issues/535
I guess, you need first to clarify your use-case (terms client server, and coap-client coap-server).
(See also mailing list
https://dev.eclipse.org/mhonarc/lists/cf-dev/msg01483.html about the terms.)
I would prefer, if you create an issue for that. Please provide the branch your using.
The addObserveRelation is defined twice, in the Resource and ObservingEndpoint.
I guess, you refer to the one in Resource, if not please correct that in the issue.
Mit freundlichen Grüßen / Best regards
Achim Kraus
(INST/ECS4)
Bosch Software Innovations GmbH | Stuttgarter Straße 130 | 71332 Waiblingen |
GERMANY | www.bosch-si.com
Sitz: Berlin, Registergericht: Amtsgericht Charlottenburg; HRB 148411 B
Aufsichtsratsvorsitzender: Dr.-Ing. Thorsten Lücke; Geschäftsführung: Dr. Stefan Ferber, Michael Hahn
From: cf-dev-bounces@xxxxxxxxxxx [mailto:cf-dev-bounces@xxxxxxxxxxx]
On Behalf Of Lino Urdiales
Sent: Sonntag, 28. Januar 2018 20:32
To: cf-dev@xxxxxxxxxxx
Subject: [cf-dev] Handling ObserveRelation Actions
Hello everybody!
I'm working on a project where I have a CoAP server as middleware between CoAP clients and a message broker server (RabbitMQ server).
In order to properly handle the connections with the Message Broker server, I override the addObserveRelation(final ObserveRelation relation)
function so every time a CoAP client connects with the CoAP server I establish a connection with the Message Broker server.
By overriding removeObserveRelation(ObserveRelation relation) I added
all the functionality to disconnect from the Message Broker server for that session.
My concern is: Is this the best way to handle connections with the message broker server or does Californium offers a listener pattern design to properly open/close connections when the session with a CoAP client has stated/ended.
P. S. Great work to anyone involved in the project.