异步消息的接收问题:)谢谢!!
客户端发送基于主题(TOPIC)信息,请问在public void onMessage(Message msg) 中可以接收吗?谢谢!!我写了一下:收不到!
public void onMessage(Message msg) {
try {
TextMessage tm = (TextMessage) msg;
String s = tm.getText();
System.out.print("okokok");
System.out.print(s);
}
catch (Exception ex) {
ex.printStackTrace();
}
/**@todo Complete this method*/
}