Beispiel #1
0
 /** Clears any listener we used. */
 private void clearListeners() {
   mucService.removeChatRoomListChangeListener(this);
   mucService.removeChatRoomProviderWrapperListener(this);
   if (protolProviderRegistrationListener != null)
     MUCActivator.bundleContext.removeServiceListener(protolProviderRegistrationListener);
   protolProviderRegistrationListener = null;
   for (ProtocolProviderService pps : MUCActivator.getChatRoomProviders()) {
     removeQueryFromProviderPresenceListeners(pps);
   }
 }
Beispiel #2
0
  /** Adds listeners for the query */
  private void initListeners() {
    for (ProtocolProviderService pps : MUCActivator.getChatRoomProviders()) {
      addQueryToProviderPresenceListeners(pps);
    }

    mucService.addChatRoomListChangeListener(this);
    mucService.addChatRoomProviderWrapperListener(this);
    protolProviderRegistrationListener = new ProtocolProviderRegListener();
    MUCActivator.bundleContext.addServiceListener(protolProviderRegistrationListener);
  }
Beispiel #3
0
  @Override
  protected void run() {
    Iterator<ChatRoomProviderWrapper> chatRoomProviders = mucService.getChatRoomProviders();

    while (chatRoomProviders.hasNext()) {
      ChatRoomProviderWrapper provider = chatRoomProviders.next();
      providerAdded(provider, true);
    }

    if (getStatus() != QUERY_CANCELED) setStatus(QUERY_COMPLETED);
  }