Package org.jivesoftware.smackx.muc

Examples of org.jivesoftware.smackx.muc.RoomInfo


    OLATResourceable syncOres = OresHelper.createOLATResourceableInstance("GroupChatJoinTask",ores.getResourceableId());
    CoordinatorManager.getCoordinator().getSyncer().doInSync(syncOres, new SyncerExecutor() {
      public void execute() {
        if (connection != null && connection.isAuthenticated()) {
          try {
            RoomInfo info = MultiUserChat.getRoomInfo(connection, roomJID);
            // throws an exception if the room does not exists
            muc.join(nickname); // log in anonymous
            addMessageListener();
            addParticipationsListener();
          } catch (XMPPException e) {
View Full Code Here


        }});
      }
    };
    //muc.addSubjectUpdatedListener(mucSubjectUpdateListener);
    try {
      RoomInfo roomInfo = MultiUserChat.getRoomInfo(account.xmpp.getConnection(),muc.getRoom());
      if(roomInfo.getSubject() != null && txtTopic.getText().equals(""))
        txtTopic.setText(roomInfo.getSubject());
    } catch (XMPPException e) {
      e.printStackTrace();
    }
   
    mucMessageListener = new PacketListener() {
View Full Code Here

    {
  DataForm dataForm = new DataForm("result");
 
  DiscoverInfo discoInfo = new DiscoverInfo();
  discoInfo.addExtension(dataForm);
  RoomInfo roomInfo = new RoomInfo(discoInfo);
  assertTrue(roomInfo.getDescription().isEmpty());
  assertTrue(roomInfo.getSubject().isEmpty());
  assertEquals(-1, roomInfo.getOccupantsCount());
    }
View Full Code Here

  occupants.addValue("3");
  dataForm.addField(occupants);

  DiscoverInfo discoInfo = new DiscoverInfo();
  discoInfo.addExtension(dataForm);
  RoomInfo roomInfo = new RoomInfo(discoInfo);
  assertEquals("The place for all good witches!", roomInfo.getDescription());
  assertEquals("Spells", roomInfo.getSubject());
  assertEquals(3, roomInfo.getOccupantsCount());
    }
View Full Code Here

  protected IChatRoomInfo getChatRoomInfo(ID roomID) {
    if (!(roomID instanceof XMPPRoomID))
      return null;
    final XMPPRoomID cRoomID = (XMPPRoomID) roomID;
    try {
      final RoomInfo info = MultiUserChat.getRoomInfo(ecfConnection.getXMPPConnection(), cRoomID.getMucString());
      if (info != null) {
        return new ECFRoomInfo(cRoomID, info, connectedID);
      }
    } catch (final XMPPException e) {
      return null;
View Full Code Here

        return null;
      // Create roomid
      final XMPPConnection conn = ecfConnection.getXMPPConnection();
      final XMPPRoomID roomID = new XMPPRoomID(connectNamespace, conn, roomname);
      final String mucName = roomID.getMucString();
      final RoomInfo info = MultiUserChat.getRoomInfo(conn, mucName);
      if (info != null) {
        return new ECFRoomInfo(roomID, info, connectedID);
      }
    } catch (final Exception e) {
      return null;
View Full Code Here

      String longname = muc.getRoom();
      if (longname == null || longname.length() <= 0) {
        longname = roomID;
      }

      final RoomInfo info = MultiUserChat.getRoomInfo(ecfConnection.getXMPPConnection(), roomID);

      if (info != null) {
        final XMPPRoomID xid = new XMPPRoomID(connectedID.getNamespace(), ecfConnection.getXMPPConnection(), roomID, longname);
        return new ECFRoomInfo(xid, info, connectedID);
      } else
View Full Code Here

TOP

Related Classes of org.jivesoftware.smackx.muc.RoomInfo

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.