Package org.apache.vysper.xmpp.modules.extension.xep0045_muc.stanzas

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.stanzas.X


//        if(receiver.getJid().equals(changer.getJid())) {
//            // send status to indicate that this is the users own presence
//            new Status(StatusCode.OWN_PRESENCE).insertElement(builder);
//        }

        builder.addPreparedElement(new X(NamespaceURIs.XEP0045_MUC_USER, new Item(changer, includeJid, true)));

        logger.debug("Room presence from {} sent to {}", roomAndNick, receiver);
        relayStanza(receiver.getJid(), builder.build(), serverRuntimeContext);
    }
View Full Code Here


       
        if(receiver.getJid().equals(changer.getJid())) {
            // send status to indicate that this is the users own presence
            inner.add(new Status(StatusCode.OWN_PRESENCE));
        }
        builder.addPreparedElement(new X(NamespaceURIs.XEP0045_MUC_USER, inner));

        relayStanza(receiver.getJid(), builder.build(), serverRuntimeContext);
    }
View Full Code Here

            } else {
                status = new Status(statusMessage);
            }
            inner.add(status);
        }
        builder.addPreparedElement(new X(NamespaceURIs.XEP0045_MUC_USER, inner));

        relayStanza(existingOccupant.getJid(), builder.build(), serverRuntimeContext);
    }
View Full Code Here

       
        return builder.build();
    }
   
    public static Stanza createInviteMessageStanza(Stanza original, String password) throws EntityFormatException {
        X orginalX = X.fromStanza(original);
       
        Invite invite = orginalX.getInvite();
        if(invite == null  || invite.getTo() == null) {
            throw new IllegalArgumentException("Invalid invite element, must exist and contain to attribute");
        }
       
        Invite newInvite = new Invite(original.getFrom(), null, invite.getReason());
View Full Code Here

        Invite newInvite = new Invite(original.getFrom(), null, invite.getReason());
        return createInviteDeclineMessageStanza(original, invite.getTo(), password, newInvite);
    }

    public static Stanza createDeclineMessageStanza(Stanza original) throws EntityFormatException {
        X orginalX = X.fromStanza(original);
       
        Decline decline = orginalX.getDecline();
        if(decline == null  || decline.getTo() == null) {
            throw new IllegalArgumentException("Invalid decline element, must exist and contain to attribute");
        }
       
        Decline newDecline = new Decline(original.getFrom(), null, decline.getReason());
View Full Code Here

        inner.add(invdec);
        if(password != null) {
            inner.add(new Password(password));
        }
       
        X newX = new X(NamespaceURIs.XEP0045_MUC_USER, inner);
        builder.addPreparedElement(newX);
        return builder.build();
    }
View Full Code Here

                xInnerElms.add(new Password(password));
            }
            if (history != null) {
                xInnerElms.add(history);
            }
            stanzaBuilder.addPreparedElement(new X(xInnerElms));
        }
        Stanza presenceStanza = stanzaBuilder.build();
        ResponseStanzaContainer container = handler.execute(presenceStanza, userSessionContext
                .getServerRuntimeContext(), true, userSessionContext, null);
        if (container != null) {
View Full Code Here

    }

    public static Stanza createPresenceStanza(Entity from, Entity to, PresenceStanzaType type, String xNamespaceUri,
            XMLElement... innerElms) {
        StanzaBuilder builder = StanzaBuilder.createPresenceStanza(from, to, null, type, null, null);
        builder.addPreparedElement(new X(xNamespaceUri, innerElms));

        return builder.build();
    }
View Full Code Here

        return builder.build();
    }

    public static Stanza createInviteMessageStanza(Stanza original, String password) throws EntityFormatException {
        X orginalX = X.fromStanza(original);

        Invite invite = orginalX.getInvite();
        if (invite == null || invite.getTo() == null) {
            throw new IllegalArgumentException("Invalid invite element, must exist and contain to attribute");
        }

        Invite newInvite = new Invite(original.getFrom(), null, invite.getReason());
View Full Code Here

        Invite newInvite = new Invite(original.getFrom(), null, invite.getReason());
        return createInviteDeclineMessageStanza(original, invite.getTo(), password, newInvite);
    }

    public static Stanza createDeclineMessageStanza(Stanza original) throws EntityFormatException {
        X orginalX = X.fromStanza(original);

        Decline decline = orginalX.getDecline();
        if (decline == null || decline.getTo() == null) {
            throw new IllegalArgumentException("Invalid decline element, must exist and contain to attribute");
        }

        Decline newDecline = new Decline(original.getFrom(), null, decline.getReason());
View Full Code Here

TOP

Related Classes of org.apache.vysper.xmpp.modules.extension.xep0045_muc.stanzas.X

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.