itm / wsn-device-utils

A set of command line utils to reprogram, reset, listen to, ... wireless sensor network devices
2 stars 5 forks source link

DeviceObserver: only execute, evaluate and fire events if listeners are registered #36

Closed danbim closed 12 years ago

danbim commented 12 years ago

Given that the DeviceObserver is already being executed periodically in an ScheduledExecutorService it still does not make sense to actually execute something if no listeners are registered. As soon as the first listener is registered the execution should start. This way there will be an event for every device currently attached to the machine.