We are considering a design for our application, where a NetworkManager object monitors availability of networks. In the case of WLAN networks, we are using the WLAN Management API SDK plugin extension, and its associated callback mechanism to get information about WLAN networks. The way the design has been envisaged, the NetworkManager would initiate or terminate new connections depending on network availability. Ideally, we would like to make the NetworkManager an active object, so that it could be activated by the scheduler for managing network connections at the right time. But the catch is that the processing to be done by the NetworkManager is dependent on a callback. This would come in the way of activating the network manager only on a need basis, similar to a threading paradigm.
So my question is, is there any way by which the callback could be coupled with the semantics of an active object? Any thoughts would be appreciated.