/** * Obtain page before the first message saved (specific chat). * <p> * Note that the messageUid is the XEP-0313 UID and <b>not</b> the stanza ID of the message. * </p> * * @param chatJid * @param messageUid the UID of the message of which messages before should be received. * @param max * @return the MAM query result * @throws XMPPErrorException * @throws NotLoggedInException * @throws NotConnectedException * @throws InterruptedException * @throws NoResponseException * @deprecated use {@link #queryArchive(MamQueryArgs)} instead. */ @Deprecated // TODO Remove in Smack 4.4 public MamQueryResult pageBefore(Jid chatJid, String messageUid, int max) throws XMPPErrorException, NotLoggedInException, NotConnectedException, InterruptedException, NoResponseException { RSMSet rsmSet = new RSMSet(null, messageUid, -1, -1, null, max, null, -1); DataForm dataForm = getNewMamForm(); addWithJid(chatJid, dataForm); return page(null, dataForm, rsmSet); }
/** * Obtain page after the last message saved (specific chat). * <p> * Note that the messageUid is the XEP-0313 UID and <b>not</b> the stanza ID of the message. * </p> * * @param chatJid * @param messageUid the UID of the message of which messages after should be received. * @param max * @return the MAM query result * @throws XMPPErrorException * @throws NotLoggedInException * @throws NotConnectedException * @throws InterruptedException * @throws NoResponseException * @deprecated use {@link #queryArchive(MamQueryArgs)} instead. */ @Deprecated // TODO Remove in Smack 4.4 public MamQueryResult pageAfter(Jid chatJid, String messageUid, int max) throws XMPPErrorException, NotLoggedInException, NotConnectedException, InterruptedException, NoResponseException { RSMSet rsmSet = new RSMSet(messageUid, null, -1, -1, null, max, null, -1); DataForm dataForm = getNewMamForm(); addWithJid(chatJid, dataForm); return page(null, dataForm, rsmSet); }