62,635
社区成员




/**
* 响应:有其他用户上线
* @param resp
*/
public void otherLogin(Response resp){
//1.设置该用户状态为上线状态
userMap.get(Integer.parseInt(resp.getSenderId())).setIsUp(1);
//2.上线提示音
new Thread(){
@SuppressWarnings("deprecation")
public void run() {
URL musicURL = null;
try {
musicURL = new File("music\\up.wav").toURL();
} catch (MalformedURLException e1) {
e1.printStackTrace();
}
AudioClip ac = Applet.newAudioClip(musicURL);
ac.play();
};
}.start();
new ViewServiceImpl().flushInfo(userMap.get(Integer.parseInt(resp.getReciverId())));
}