-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Similar to Issue #210
Use case: A reverse proxy implementation consumes a physical Thing in a local network and reexposes it as a new virtual ExposedThing to another network. A consumer of the virtual ExposedThing starts observing a property. The issue is that there is no way to detect and handle a new observer so that the proxy can start observing a property in the physical Thing. A non-optimal solution is to observe properties of the physical Thing in the beginning (without any subscription) and write new values into the properties of the virtual ExposedThing, which results in the new values being sent to the Consumer.
Proposal: Create two new methods in the ExposedThing interface, one to handle the observeproperty
operation and one to handle unobserveproperty
. These could be similar to setPropertyReadHandler. Example:
-
setPropertyObserveHandler(propertyName, ? observerCount): This could also solve the handling of subscription payloads. A subscription count would be interesting if the implementation wants to limit the number of subscriptions due to resource
-
setPropertyUnobserveHandler(eventName, ? observerCount): Similar to the above