next up previous contents
Next: The cricketdaemon.clientlib.ServerBroker Class Up: Developing Cricket Applications in Previous: Compiling Clientlib   Contents

Clientlib API

Figure 4.2: Clientlib Architecture
\includegraphics[width=4.5in trim=0in 6in 0in 0in]{arch.pdf}

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.



Subsections

Michel Goraczko 2004-12-02