Java 类org.jivesoftware.smackx.bookmarks.BookmarkManager 实例源码

项目:jmeter-bzm-plugins    文件:GetBookmarks.java   
@Override
public SampleResult perform(JMeterXMPPSampler sampler, SampleResult res) throws Exception {
    BookmarkManager manager = BookmarkManager.getBookmarkManager(sampler.getXMPPConnection());
    Collection<BookmarkedConference> confs = manager.getBookmarkedConferences();
    StringBuilder text = new StringBuilder();
    for (BookmarkedConference room : confs) {
        text.append(room.getJid());
        text.append("\r\n");
    }
    res.setResponseData(text.toString().getBytes());
    return res;
}