Examples of findOccupantByNick()


Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.findOccupantByNick()

               
                // sender must be participant in room
                    if(roomWithNickJid.isResourceSet()) {
                        if(sendingOccupant != null) {
                            // got resource, private message for occupant
                            Occupant receivingOccupant = room.findOccupantByNick(roomWithNickJid.getResource());
                           
                            // must be sent to an existing occupant in the room
                            if(receivingOccupant != null) {
                               
                                Entity roomAndSendingNick = new EntityImpl(room.getJID(), sendingOccupant.getName());
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.findOccupantByNick()

                // might be an items request on a room
                Room room = conference.findRoom(request.getTo().getBareJID());
                if (room != null) {
                    if (request.getTo().getResource() != null) {
                        // request for an occupant
                        Occupant occupant = room.findOccupantByNick(request.getTo().getResource());
                        // request for occupant, relay
                        if (occupant != null) {
                            relayDiscoStanza(occupant.getJid(), request, NamespaceURIs.XEP0030_SERVICE_DISCOVERY_INFO);
                        }
                    } else {
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.findOccupantByNick()

            // might be an items request on a room
            Room room = conference.findRoom(to.getBareJID());
            if (room != null) {
                if (to.getResource() != null) {
                    // request for an occupant
                    Occupant occupant = room.findOccupantByNick(to.getResource());
                    // request for occupant, relay
                    if (occupant != null) {
                        relayDiscoStanza(occupant.getJid(), request, NamespaceURIs.XEP0030_SERVICE_DISCOVERY_ITEMS);
                    }
                } else {
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.findOccupantByNick()

        IQStanza result = (IQStanza) IQStanza.getWrapper(sendIq(OCCUPANT1_JID, ROOM2_JID, SET, "id1",
                NamespaceURIs.XEP0045_MUC_ADMIN, new IqAdminItem("Nick 2", Role.Participant)));
       
        assertIqResultStanza(ROOM2_JID, OCCUPANT1_JID, "id1", result);

        assertEquals(Role.Participant, room.findOccupantByNick("Nick 2").getRole());

        // verify that remaining users got presence
        assertPresenceStanza(new EntityImpl(ROOM2_JID, "Nick 2"), OCCUPANT2_JID, null,
                new MucUserItem(null, null, Affiliation.None, Role.Participant), null, occupant2Queue.getNext());
        assertPresenceStanza(new EntityImpl(ROOM2_JID, "Nick 2"), OCCUPANT1_JID, null,
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.findOccupantByNick()

            if (room == null)
                return null;

            if (request.getTo().getResource() != null) {
                // request for an occupant
                Occupant occupant = room.findOccupantByNick(request.getTo().getResource());
                // request for occupant, relay
                if (occupant != null) {
                    relayDiscoStanza(occupant.getJid(), request, NamespaceURIs.XEP0030_SERVICE_DISCOVERY_INFO);
                }
                return null;
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.findOccupantByNick()

            // might be an items request on a room
            Room room = conference.findRoom(to.getBareJID());
            if (room != null) {
                if (to.getResource() != null) {
                    // request for an occupant
                    Occupant occupant = room.findOccupantByNick(to.getResource());
                    // request for occupant, relay
                    if (occupant != null) {
                        relayDiscoStanza(occupant.getJid(), request, NamespaceURIs.XEP0030_SERVICE_DISCOVERY_ITEMS);
                    }
                } else {
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.findOccupantByNick()

                        return handleInvites(stanza, from, sendingOccupant, room, serverRuntimeContext);
                    }
                } else if (roomWithNickJid.isResourceSet()) {
                    if (sendingOccupant != null) {
                        // got resource, private message for occupant
                        Occupant receivingOccupant = room.findOccupantByNick(roomWithNickJid.getResource());

                        // must be sent to an existing occupant in the room
                        if (receivingOccupant != null) {

                            Entity roomAndSendingNick = new EntityImpl(room.getJID(), sendingOccupant.getNick());
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.findOccupantByNick()

    public void testGrantModeration() throws Exception {
        chat.join(NICK1);
       
        Room room = conference.findRoom(EntityImpl.parseUnchecked(ROOM_JID));
        assertEquals(Role.Moderator, room.findOccupantByNick(NICK1).getRole());
       
        chat2.join(NICK2);
       
        chat.grantModerator(NICK2);
        assertEquals(Role.Moderator, room.findOccupantByNick(NICK2).getRole());
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.findOccupantByNick()

        assertEquals(Role.Moderator, room.findOccupantByNick(NICK1).getRole());
       
        chat2.join(NICK2);
       
        chat.grantModerator(NICK2);
        assertEquals(Role.Moderator, room.findOccupantByNick(NICK2).getRole());
       
    }

}
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.findOccupantByNick()

                        return handleInvites(stanza, from, sendingOccupant, room, serverRuntimeContext);
                    }
                } else if (roomWithNickJid.isResourceSet()) {
                    if (sendingOccupant != null) {
                        // got resource, private message for occupant
                        Occupant receivingOccupant = room.findOccupantByNick(roomWithNickJid.getResource());

                        // must be sent to an existing occupant in the room
                        if (receivingOccupant != null) {

                            Entity roomAndSendingNick = new EntityImpl(room.getJID(), sendingOccupant.getNick());
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.