Examples of IChatRoomInfo


Examples of org.eclipse.ecf.presence.chatroom.IChatRoomInfo

    dialog.open();
    // If selection cancelled then simply return
    if (dialog.getReturnCode() != Window.OK)
      return;
    // Get selected room, selected manager, and selected IChatRoomInfo
    IChatRoomInfo selectedInfo = dialog.getSelectedRoom().getRoomInfo();
    MultiRosterAccount account = dialog.getSelectedRoom().getAccount();
    // Now get the secondary ID from the selected room id
    final IContainer container = account.getContainer();
    final ID connectedID = container.getConnectedID();
    if (connectedID == null) {
      MessageDialog.openError(getViewSite().getShell(), Messages.MultiRosterView_NO_IDENTIFIER_FOR_ROOM_TITLE, NLS.bind(Messages.MultiRosterView_NO_IDENTIFIER_FOR_ROOM_MESSAGE, selectedInfo.getRoomID()));
      return;
    }

    try {
      joinChatRoom(container, selectedInfo, null);
    } catch (ECFException e) {
      Throwable e1 = e.getStatus().getException();
      Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, Messages.MultiRosterView_EXCEPTION_LOG_JOIN_ROOM, e1));
      ContainerConnectErrorDialog ed = new ContainerConnectErrorDialog(getViewSite().getShell(), selectedInfo.getRoomID().getName(), e1);
      ed.open();
    }
  }
View Full Code Here

Examples of org.eclipse.ecf.presence.chatroom.IChatRoomInfo

      container.connect(targetID, context);

      String[] roomNames = bot.getChatRooms();
      String[] roomPasswords = bot.getChatRoomPasswords();
      for (int i = 0; i < roomNames.length; i++) {
        IChatRoomInfo room = manager.getChatRoomInfo(roomNames[i]);
        roomContainer = room.createChatRoomContainer();

        roomID = room.getRoomID();

        firePreRoomConnect();

        roomContainer.addMessageListener(this);
       
View Full Code Here

Examples of org.eclipse.ecf.presence.chatroom.IChatRoomInfo

    chat0 = getPresenceAdapter(0).getChatRoomManager();
    chat1 = getPresenceAdapter(1).getChatRoomManager();
    for (int i = 0; i < getClientCount(); i++) {
      connectClient(i);
    }
    final IChatRoomInfo roomInfo0 = chat0.getChatRoomInfo(CHAT_ROOM_NAME);
    if (roomInfo0 == null) return;
    chatRoomContainer0 = roomInfo0.createChatRoomContainer();
    chatRoomContainer0.addChatRoomParticipantListener(participantListener0);
    chatRoomContainer0.connect(roomInfo0.getRoomID(), null);
    final IChatRoomInfo roomInfo1 = chat1.getChatRoomInfo(CHAT_ROOM_NAME);
    chatRoomContainer1 = roomInfo1.createChatRoomContainer();
    chatRoomContainer1.addChatRoomParticipantListener(participantListener1);
    chatRoomContainer1.connect(roomInfo1.getRoomID(), null);
    Thread.sleep(2000);
  }
View Full Code Here

Examples of org.eclipse.ecf.presence.chatroom.IChatRoomInfo

    setClientCount(2);
    chatRoomContainer = new IChatRoomContainer[2];
    clients = createClients();
    for (int i = 0; i < 2; i++) {
      connectClient(i);
      final IChatRoomInfo info = getPresenceAdapter(i).getChatRoomManager().getChatRoomInfo(CHAT_ROOM_NAME);
      if (info == null) {
        chatRoomContainer[i] = null;
      } else {
        chatRoomContainer[i] = info.createChatRoomContainer();
        chatRoomContainer[i].connect(info.getRoomID(), null);
      }
    }
  }
View Full Code Here

Examples of org.eclipse.ecf.presence.chatroom.IChatRoomInfo

  }

  public void testSendInvitation() throws Exception {
    final IChatRoomInvitationSender invitationSender = chat0.getInvitationSender();
    assertNotNull(invitationSender);
    final IChatRoomInfo roomInfo = chat0.getChatRoomInfo(CHAT_ROOM_NAME);
    if (roomInfo == null) return;
    final IChatRoomContainer chatRoomContainer = roomInfo.createChatRoomContainer();
    chatRoomContainer.connect(roomInfo.getRoomID(), null);
    invitationSender.sendInvitation(roomInfo.getRoomID(), getClient(1).getConnectedID(), null, "this is an invitation");
    try {
      synchronized (synchObject) {
        synchObject.wait(WAITTIME);
      }
    } catch (final Exception e) {
View Full Code Here

Examples of org.eclipse.ecf.presence.chatroom.IChatRoomInfo

    if (chatRooms == null)
      return new IChatRoomInfo[0];
    final IChatRoomInfo[] res = new IChatRoomInfo[chatRooms.length];
    int count = 0;
    for (int i = 0; i < chatRooms.length; i++) {
      final IChatRoomInfo infoResult = getChatRoomInfo(chatRooms[i]);
      if (infoResult != null) {
        res[count++] = infoResult;
      }
    }
    final IChatRoomInfo[] results = new IChatRoomInfo[count];
View Full Code Here

Examples of org.eclipse.ecf.presence.chatroom.IChatRoomInfo

    ID targetID = IDFactory.getDefault().createID(
        namespace,
        "irc://" + bot.getName() + "@" + bot.getServer());
    container.connect(targetID, null);
    IChatRoomInfo room = manager.getChatRoomInfo(bot.getChannel());
    IChatRoomContainer roomContainer = room.createChatRoomContainer();
    roomContainer.connect(room.getRoomID(), null);
    roomContainer.addMessageListener(this);
    sender = roomContainer.getChatRoomMessageSender();
  }
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.