Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[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.

Hope to hear from you.

P. S. Great work to anyone involved in the project.

Back to the top