Given the successful data request, the resulting hashtable can be stored as follows:
if (request.service().equals(DataRequest.MEDIATOR))
if (request.result() instanceof Hashtable)
IDCard.set((Hashtable) request.result());
b. Retrieving the current delegates
Given the successful data request, the result is a vector of 2-tuples, the first element of each is the address card, the second element the HTML script for the iconized presentation of the delegate.
if (request.service().equals(DataRequest.MEDIATOR))
if (request.result() instanceof Vector)
this.delegates = (Vector) request.result();
c. Retrieving a user's address card
Your own address card is always known to the speaker and can be retrieved as follows:
IDCard myCard = speaker.id();
If you have previously retrieved and maintained the current users, you can determine a user's address card given the username as follows:
IDCard card = IDCard.get(username);
Otherwise, upon requesting the user's address card from the mediator service, the result can be accessed as follows:
if (request.service().equals(DataRequest.MEDIATOR))
if (request.result() instanceof IDCard) {
IDCard card = (IDCard) request.result();
...
}
Last modified on 27 May 1999 by Rudi Stouffs