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


// TANGO api `receive' implementation
public void receive (AppEventMessage em) {
if (em.getType() == Const.CONTROL) {//check message type
CAppAnswerEventMessage msg = (CAppAnswerEventMessage) em;
//The above is conversion to control message
if (msg.getAnswerType() == CAConsts.USERNAME)
un = msg.getUserName(); //extraction of data
} else { //DATA type message
String msg=new String
(em.getData(),0,0,em.getLen()); //extraction of data
ta.appendText(msg);
}
}



© 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