openfire接收离线消息

先接收离线消息后再通知openfire上线

//获取离线消息
        OfflineMessageManager offlineMessageManager=new OfflineMessageManager(connection);
       Iterator<Message> messages=offlineMessageManager.getMessages();
       while (messages.hasNext()){
           Message msg=messages.next();
           System.out.println(msg.toXML());
       }

 

posted @ 2018-12-05 18:46  甜菜波波  阅读(601)  评论(0编辑  收藏  举报