Package rocks.xmpp.extensions.offline.model

Examples of rocks.xmpp.extensions.offline.model.OfflineMessage$Item


     * @throws rocks.xmpp.core.stanza.model.StanzaException If the server returned a stanza error.
     * @throws rocks.xmpp.core.session.NoResponseException  If the server did not respond.
     * @see <a href="http://xmpp.org/extensions/xep-0013.html#remove-all">2.7 Removing All Messages</a>
     */
    public void removeAllMessages() throws XmppException {
        xmppSession.query(new IQ(IQ.Type.SET, new OfflineMessage(false, true)));
    }
View Full Code Here


                "    <item action='view'\n" +
                "          node='2003-02-27T22:52:37.225Z'/>\n" +
                "  </offline>\n" +
                "</iq>";
        IQ iq = unmarshal(xml, IQ.class);
        OfflineMessage offlineMessage = iq.getExtension(OfflineMessage.class);
        Assert.assertNotNull(offlineMessage);
        Assert.assertEquals(offlineMessage.getItems().size(), 1);
    }
View Full Code Here

        Assert.assertEquals(offlineMessage.getItems().size(), 1);
    }

    @Test
    public void marshalOfflineMessagesFetch() throws JAXBException, XMLStreamException {
        String xml = marshal(new OfflineMessage(true, false));
        Assert.assertEquals("<offline xmlns=\"http://jabber.org/protocol/offline\"><fetch></fetch></offline>", xml);
    }
View Full Code Here

        Assert.assertEquals("<offline xmlns=\"http://jabber.org/protocol/offline\"><fetch></fetch></offline>", xml);
    }

    @Test
    public void marshalOfflineMessagesPurge() throws JAXBException, XMLStreamException {
        String xml = marshal(new OfflineMessage(false, true));
        Assert.assertEquals("<offline xmlns=\"http://jabber.org/protocol/offline\"><purge></purge></offline>", xml);
    }
View Full Code Here

        Assert.assertEquals("<offline xmlns=\"http://jabber.org/protocol/offline\"><purge></purge></offline>", xml);
    }

    @Test
    public void marshalOfflineMessagesRetrieval() throws JAXBException, XMLStreamException {
        String xml = marshal(new OfflineMessage(false, true));
        Assert.assertEquals("<offline xmlns=\"http://jabber.org/protocol/offline\"><purge></purge></offline>", xml);
    }
View Full Code Here

TOP

Related Classes of rocks.xmpp.extensions.offline.model.OfflineMessage$Item

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.