next up previous contents
Next: The cricketdaemon.clientlib.data.CricketData Class Up: Clientlib API Previous: The cricketdaemon.clientlib.ServerBroker Class   Contents

The cricketdaemon.clientlib.Callback Class

As mentioned above, all applications should have at least one callback handler object that implements the Callback interface in order to receive location updates from the CricketDaemeon.

void callback(CricketData data, BitSet mask);

This method gets invoked whenever CricketDaemon updates a location value type that matches a type bit that has been set in the fieldMask parameter when the callback was registered. The updated value is packaged in the CricketData object. The callback mask mask specifies which type of value is available in CricketData.

Beware that the same data object gets passed to every callback handler. As a result, any modifications made to data becomes visible to another callback handler. Ideally, the CricketData object should be immutable. But it is not immutable for efficiency reasons. Thus, be warned that modifications to data may cause unexpected errors in your applications.



Michel Goraczko 2004-12-02