Package org.jivesoftware.xmpp.workgroup.interceptor

Examples of org.jivesoftware.xmpp.workgroup.interceptor.RoomInterceptorManager.invokeInterceptors()


                    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
                Map<Packet, java.util.Date> messageList = transcripts.get(roomID);
                if (messageList == null) {
View Full Code Here


                    transcripts.remove(roomID);
                    // Trigger the event that a chat support has finished
                    WorkgroupEventDispatcher.chatSupportFinished(this, sessionID);
                }
                // Invoke the room interceptor after the presence has been processed
                interceptorManager.invokeInterceptors(getJID().toBareJID(), packet, false, true);
            }
            else if (packet instanceof Message) {
                // Filter messages sent from the room itself since we don't want the
                // transcript to include things like "room locked"
                if (packet.getFrom().getResource() != null) {
View Full Code Here

            else if (packet instanceof Message) {
                // Filter messages sent from the room itself since we don't want the
                // transcript to include things like "room locked"
                if (packet.getFrom().getResource() != null) {
                    // Invoke the room interceptor before processing the presence
                    interceptorManager.invokeInterceptors(getJID().toBareJID(), packet, false, false);
                    // Add the new message to the list of sent packets
                    Map<Packet, java.util.Date> messageList = transcripts.get(roomID);
                    if (messageList == null) {
                        messageList = new LinkedHashMap<Packet, java.util.Date>();
                        transcripts.put(roomID, messageList);
View Full Code Here

                        messageList = new LinkedHashMap<Packet, java.util.Date>();
                        transcripts.put(roomID, messageList);
                    }
                    messageList.put(packet.createCopy(), new java.util.Date());
                    // Invoke the room interceptor after the presence has been processed
                    interceptorManager.invokeInterceptors(getJID().toBareJID(), packet, false, true);
                }
            }
        }
    }
View Full Code Here

            final String roomJID = roomName + "/" + workgroupName;

            // Create the room by joining it. The workgroup will be the owner of the room and will
            // invite the Agent and the user to join the room
            JoinRoom joinRoom = new JoinRoom(getFullJID().toString(), roomJID);
            interceptorManager.invokeInterceptors(getJID().toBareJID(), joinRoom, false, false);
            send(joinRoom);
            interceptorManager.invokeInterceptors(getJID().toBareJID(), joinRoom, false, true);

            // Configure the newly created room
            Map<String, Collection<String>> fields = new HashMap<String, Collection<String>>();
View Full Code Here

            // Create the room by joining it. The workgroup will be the owner of the room and will
            // invite the Agent and the user to join the room
            JoinRoom joinRoom = new JoinRoom(getFullJID().toString(), roomJID);
            interceptorManager.invokeInterceptors(getJID().toBareJID(), joinRoom, false, false);
            send(joinRoom);
            interceptorManager.invokeInterceptors(getJID().toBareJID(), joinRoom, false, true);

            // Configure the newly created room
            Map<String, Collection<String>> fields = new HashMap<String, Collection<String>>();
            // Make a non-public room
            List<String> values = new ArrayList<String>();
View Full Code Here

            fields.put("muc#roomconfig_presencebroadcast", values);

            RoomConfiguration conf = new RoomConfiguration(fields);
            conf.setTo(roomName);
            conf.setFrom(getFullJID());
            interceptorManager.invokeInterceptors(getJID().toBareJID(), conf, false, false);
            send(conf);
            interceptorManager.invokeInterceptors(getJID().toBareJID(), conf, false, true);

            // Create a new entry for the active session and the request made by the user
            requests.put(sessionID, request);
View Full Code Here

            RoomConfiguration conf = new RoomConfiguration(fields);
            conf.setTo(roomName);
            conf.setFrom(getFullJID());
            interceptorManager.invokeInterceptors(getJID().toBareJID(), conf, false, false);
            send(conf);
            interceptorManager.invokeInterceptors(getJID().toBareJID(), conf, false, true);

            // Create a new entry for the active session and the request made by the user
            requests.put(sessionID, request);

            // Invite the Agent to the new room
View Full Code Here

            // anonymous user
            if (request.isAnonymousUser()) {
                element = invitation.addChildElement("user", "http://jivesoftware.com/protocol/workgroup");
                element.addAttribute("id", request.getUserID());
            }
            interceptorManager.invokeInterceptors(getJID().toBareJID(), invitation, false, false);
            send(invitation);
            interceptorManager.invokeInterceptors(getJID().toBareJID(), invitation, false, true);

            // Invite the user to the new room
            sendUserInvitiation(request, roomName);
View Full Code Here

                element = invitation.addChildElement("user", "http://jivesoftware.com/protocol/workgroup");
                element.addAttribute("id", request.getUserID());
            }
            interceptorManager.invokeInterceptors(getJID().toBareJID(), invitation, false, false);
            send(invitation);
            interceptorManager.invokeInterceptors(getJID().toBareJID(), invitation, false, true);

            // Invite the user to the new room
            sendUserInvitiation(request, roomName);

            // Notify the request that invitations for support have been sent
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.