The method
covNotificationReceived(...)
in
com.serotonin.bacnet4j.event.DeviceEventLiistener
is fired on the client side when a BACnet client receives a value change from a BACnet server. What I need is the opposite - I need an event on the server side when a client starts to poll for a BACnetObject property (in my case the PresentValue). The proper place for a hook could be
BACnetObject.addCovSubscription()
BACnetObject.removeCovSubscription()
or
CovReportingMixin.addCovSubscription()
CovReportingMixin.removeCovSubscription()
Both are not easy to implement via subclassing (Bacnet4J library does not allow me to add my own MixIn, for example) so I ended by changing the original source code.