Package org.jivesoftware.smackx.muc

Examples of org.jivesoftware.smackx.muc.MultiUserChat.join()


        XMPPConnection producerCon = new XMPPConnection(config);
        producerCon.connect();
        producerCon.login("producer", "producer");
        MultiUserChat producerMuc = new MultiUserChat(producerCon, "muc-test");
        producerMuc.join("producer");

        for (int i = 0; i < 10; i++) {
            LOG.info("Sending message: " + i);
            Message message = producerMuc.createMessage();
            message.setBody("Hello from producer, message # " + i);
View Full Code Here


    }

    public void joinConference(String room) {
        MultiUserChat muc = new MultiUserChat(connection, room);
        try {
            muc.join(chatRoom);
            myChatRooms.add(muc);
            PacketListener myListener = new PacketListener() {

                @Override
                public void processPacket(Packet packet) {
View Full Code Here

    }
   
    if (groupChat == null) {
      groupChat = new MultiUserChat(this.connection, chat.getName());
      try {
        groupChat.join(this.groupChatNick, chat.getPassword());
      } catch (XMPPException e) {
        LOGGER.warning("Cannot join group chat '" + chat + "'. Exception:\n" + ExceptionHelper.dump(e));
        throw new IMException(e);
      } catch (SmackException e) {
                LOGGER.warning("Cannot join group chat '" + chat + "'. Exception:\n" + ExceptionHelper.dump(e));
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.