Basic HTML version of Foils prepared

Foil 13 Java API - code example II Contd

From General Tango API Java JavaScript and C Tango Tutorial San Diego MRA -- June 26 27 98 Datemod;June 26 98. by TangoInteractive Team


1 // TANGO api `receive' implementation
2 public void receive (AppEventMessage em) {
3 if (em.getType() == Const.CONTROL) {//check message type
4 CAppAnswerEventMessage msg = (CAppAnswerEventMessage) em;
5 //The above is conversion to control message
6 if (msg.getAnswerType() == CAConsts.USERNAME)
7 un = msg.getUserName(); //extraction of data
8 } else { //DATA type message
9 String msg=new String
10 (em.getData(),0,0,em.getLen()); //extraction of data
11 ta.appendText(msg);
12 }
13 }

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Nov 29 1998