The Java Cricket Client library (Clientlib) uses callbacks to feed location information to the application. As shown in Figure 4.2, a Java application instantiates one ServerBroker object. The ServerBroker object is an independent thread that interfaces between a set of callback handlers in the Cricket application and the CricketDaemon. At least one object in the Java application implements a callback handler and registers with the ServerBroker. In the callback registration, the callback handler object specifies a callback mask that selects the type(s) of location updates that should trigger the callback handler being registered. The ServerBroker dispatches the callback handlers whenever it receives a location update from the CricketDaemon that matches the callback mask.