Examples of toBareJID()


Examples of org.xmpp.packet.JID.toBareJID()

        }
        JID jidFrom = presence.getFrom();
        JID jidTo = presence.getTo();

        // Manage the cache of remote presence resources.
        Set<JID> remotePresenceSet = knownRemotePresences.get(jidTo.toBareJID());

        if (jidFrom.getResource() != null) {
            if (remotePresenceSet != null) {
                remotePresenceSet.add(jidFrom);
            }
View Full Code Here

Examples of org.xmpp.packet.JID.toBareJID()

                remotePresenceSet.add(jidFrom);
            }
            else {
                remotePresenceSet = new HashSet<JID>();
                remotePresenceSet.add(jidFrom);
                knownRemotePresences.put(jidTo.toBareJID(), remotePresenceSet);
            }

            // TODO Check the roster presence subscription to allow or ignore the received presence.
            // TODO Directed presences should be ignored when no presence subscription exists
View Full Code Here

Examples of org.xmpp.packet.JID.toBareJID()

            // TODO Check the roster presence subscription to allow or ignore the received presence.
            // TODO Directed presences should be ignored when no presence subscription exists

            // Send the presence packet recipient's last published items to the remote user.
            PEPService pepService = pepServiceManager.getPEPService(jidTo.toBareJID());
            if (pepService != null) {
                pepService.sendLastPublishedItems(jidFrom);
            }
        }
    }
View Full Code Here

Examples of org.xmpp.packet.JID.toBareJID()

        }
        final JID jidFrom = presence.getFrom();
        final JID jidTo = presence.getTo();

        // Manage the cache of remote presence resources.
        final Set<JID> remotePresenceSet = knownRemotePresences.get(jidTo.toBareJID());

        if (remotePresenceSet != null) {
            remotePresenceSet.remove(jidFrom);
        }
    }
View Full Code Here

Examples of org.xmpp.packet.JID.toBareJID()

    public void executeGet(IQ packet, Workgroup workgroup) {
        IQ reply = IQ.createResultIQ(packet);

        JID from = packet.getFrom();
        String bareJID = from.toBareJID();

        boolean isMonitor = false;

        // Retrieve the sound settings.
        String monitors = workgroup.getProperties().getProperty("monitors");
View Full Code Here

Examples of org.xmpp.packet.JID.toBareJID()

        IQ reply = null;
        Element iq = packet.getChildElement();

        try {
            JID from = packet.getFrom();
            String bareJID = from.toBareJID();
            if (!isOwner(bareJID, workgroup)) {
                reply = IQ.createResultIQ(packet);
                reply.setChildElement(packet.getChildElement().createCopy());
                reply.setError(new PacketError(PacketError.Condition.forbidden));
                workgroup.send(reply);
View Full Code Here

Examples of org.xmpp.packet.JID.toBareJID()

                // Skip this presence if it's the presence of this workgroup in the room
                if (workgroupName.equals(packet.getFrom().getResource())) {
                    return;
                }
                JID presenceFullJID = new JID(item.attributeValue("jid"));
                String presenceJID = presenceFullJID.toBareJID();
                // Invoke the room interceptor before processing the presence
                interceptorManager.invokeInterceptors(getJID().toBareJID(), packet, false, false);
                // Get the userID associated to this sessionID
                UserRequest initialRequest = requests.get(sessionID);
                // Add the new presence to the list of sent packets
View Full Code Here

Examples of org.xmpp.packet.JID.toBareJID()

        JID userAddress = leaveRole.getUserAddress();
        // Notify the user that he/she is no longer in the room
        leaveRole.destroy();
        // Update the tables of occupants based on the bare and full JID
        List list = occupantsByBareJID.get(userAddress.toBareJID());
        if (list != null) {
            list.remove(leaveRole);
            if (list.isEmpty()) {
                occupantsByBareJID.remove(userAddress.toBareJID());
            }
View Full Code Here

Examples of org.xmpp.packet.JID.toBareJID()

        // Update the tables of occupants based on the bare and full JID
        List list = occupantsByBareJID.get(userAddress.toBareJID());
        if (list != null) {
            list.remove(leaveRole);
            if (list.isEmpty()) {
                occupantsByBareJID.remove(userAddress.toBareJID());
            }
        }
        occupantsByFullJID.remove(userAddress);
        if (originator) {
            // Fire event that occupant left the room
View Full Code Here

Examples of org.xmpp.packet.JID.toBareJID()

            // Handling Subscription
            if (Presence.Type.subscribe == packet.getType()) {
                // User wants to track the workgroup presence so accept the request
                // Add sender to the workgroup roster
                // Only create item if user was not already subscribed to workgroup's presence
                if (!presenceSubscribers.contains(sender.toBareJID())) {
                    createRosterItem(sender);
                }
                // Reply that the subscription request was approved
                Presence reply = new Presence();
                reply.setTo(sender);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.