Skip to content

[ExposedThing] Not possible to handle property observations in Scripting level  #211

@egekorkan

Description

@egekorkan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions