Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[leshan-dev] ObservationRegistryImpl details

I have some confusion about implementation of ObservationRegistryImpl.java.
  • Why do we have ObservationRegistryImpl implements ObservationListener?
    • I would expect ObservationRegistryImpl class to just handle addObservation ,cancelObservation etc. and not members of ObservationListener.
    • ObservationRegistryListener should declare
      • newObservation() and removedObservarion()
      • It should not extend class ObservationListener
    • Listeners who want to listen to resource changed notification should call Observation.addListener() in ObservationRegistryListener.newObservation()
  • With the current implementation all ObservationRegistryListeners will get notified about resource change even if they are not interested in that resource. Is this expected behavior?

Am I missing something?

Thanks,
Mrinal

Back to the top