Package rocks.xmpp.extensions.pubsub.model.event

Examples of rocks.xmpp.extensions.pubsub.model.event.Event$Configuration


                "    <purge node='princely_musings'/>\n" +
                "  </event>\n" +
                "</message>";
        Message message = unmarshal(xml, Message.class);
        Assert.assertNotNull(message);
        Event event = message.getExtension(Event.class);
        Assert.assertNotNull(event);
        Assert.assertNotNull(event.isPurge());
        Assert.assertEquals(event.getNode(), "princely_musings");
    }
View Full Code Here


                "        subscription='subscribed'/>\n" +
                "  </event>\n" +
                "</message>\n";
        Message message = unmarshal(xml, Message.class);
        Assert.assertNotNull(message);
        Event event = message.getExtension(Event.class);
        Assert.assertNotNull(event);
        Assert.assertNotNull(event.getSubscription());
        Assert.assertNotNull(event.getSubscription().getExpiry());
        Assert.assertEquals(event.getSubscription().getNode(), "princely_musings");
        Assert.assertEquals(event.getSubscription().getJid(), Jid.valueOf("francisco@denmark.lit"));
        Assert.assertEquals(event.getSubscription().getSubscriptionState(), SubscriptionState.SUBSCRIBED);
        Assert.assertEquals(event.getSubscription().getSubId(), "ba49252aaa4f5d320c24d3766f0bdcade78c78d3");
    }
View Full Code Here

        xmppSession.addMessageListener(new MessageListener() {
            @Override
            public void handle(MessageEvent e) {
                if (e.isIncoming() && isEnabled()) {
                    Message message = e.getMessage();
                    Event event = message.getExtension(Event.class);
                    if (event != null) {
                        for (Item item : event.getItems()) {
                            if (item.getPayload() instanceof AvatarMetadata) {
                                AvatarMetadata avatarMetadata = (AvatarMetadata) item.getPayload();

                                // Empty avatar
                                if (avatarMetadata.getInfoList().isEmpty()) {
View Full Code Here

        xmppSession.addMessageListener(new MessageListener() {
            @Override
            public void handle(MessageEvent e) {
                if (e.isIncoming()) {
                    Message message = e.getMessage();
                    Event event = message.getExtension(Event.class);
                    if (event != null) {
                        int i = 0;
                    }
                }
            }
View Full Code Here

TOP

Related Classes of rocks.xmpp.extensions.pubsub.model.event.Event$Configuration

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.