Examples of BuddyGroup


Examples of com.valhalla.jbother.jabber.BuddyGroup

        // find out if the group alread exists
        whileLoop: while (children.hasMoreElements()) {
            AutomatedTreeNode theNode = (AutomatedTreeNode) children
                    .nextElement();
            BuddyGroup g = (BuddyGroup) theNode.getUserObject();
            if (g.getGroupName().equals(group.getGroupName())) {
                node = theNode;
                check = true;
                break whileLoop;
            }
        }
View Full Code Here

Examples of com.valhalla.jbother.jabber.BuddyGroup

        }
        if (!showAgentBuddies
                && temp.equals(resources.getString("transportsGroup"))) {
            return null;
        }
        BuddyGroup group = (BuddyGroup) groups.get(name);
        if (group == null)
            group = new BuddyGroup(name);
        groups.put(name, group);
        return group;
    }
View Full Code Here

Examples of com.valhalla.jbother.jabber.BuddyGroup

        final String group = tempGroup;

        if( buddy.getRosterEntry() == null ) add = false;

        BuddyGroup gObj = getGroupObject(group);
        if (gObj == null)
            return;

        gObj.addBuddy(buddy);

        if (add) {
            final AutomatedTreeNode node = checkGroup(gObj);
            node.setUserObject(gObj);

            // find the group that the buddy belongs to
            int index = getBuddyIndex(gObj.getGroupName(), buddy);

            if (!isInTree(buddy)) {
                node.insert(new AutomatedTreeNode(buddy), index);
            }
View Full Code Here

Examples of com.valhalla.jbother.jabber.BuddyGroup

                        if (temp.getUser().equals(buddy.getUser())) {
                            // once we find the buddy, remove it
                            removeBuddyNode(node, leaf);
                            if (removeFromGroup) {
                                BuddyGroup g = getGroupObject(group);
                                g.removeBuddy(buddy);
                            }
                        }
                    }
                }
            }
View Full Code Here

Examples of org.jboss.cache.buddyreplication.BuddyGroup

   }

   public void testNotifyBuddyGroupChange()
   {
      assert allEventsListener.buddyGroupChangedEvent == null;
      BuddyGroup buddyGroup = new BuddyGroup();
      notifier.notifyBuddyGroupChange(buddyGroup, true);
      assert allEventsListener.buddyGroupChangedEvent != null;
      assert allEventsListener.buddyGroupChangedEvent.getBuddyGroup().equals(buddyGroup);
      assert allEventsListener.buddyGroupChangedEvent.getType() == Event.Type.BUDDY_GROUP_CHANGED;
   }
View Full Code Here

Examples of org.jboss.cache.buddyreplication.BuddyGroup

   }

   public void testNotifyBuddyGroupChange()
   {
      assert allEventsListener.buddyGroupChangedEvent == null;
      BuddyGroup buddyGroup = new BuddyGroup();
      notifier.notifyBuddyGroupChange(buddyGroup, true);
      assert allEventsListener.buddyGroupChangedEvent != null;
      assert allEventsListener.buddyGroupChangedEvent.getBuddyGroup().equals(buddyGroup);
      assert allEventsListener.buddyGroupChangedEvent.getType() == Event.Type.BUDDY_GROUP_CHANGED;
   }
View Full Code Here

Examples of org.jboss.cache.buddyreplication.BuddyGroup

      public void buddyChanged(BuddyGroupChangedEvent e)
      {
         System.out.println("Received event " + e);
         if (!e.isPre())
         {
            BuddyGroup bg = e.getBuddyGroup();

            boolean passed = bg.getDataOwner().equals(caches[1].getLocalAddress()) &&
                  bg.getBuddies().size() == 1 &&
                  bg.getBuddies().contains(caches[(numActiveCaches == 3) ? 2 : 0].getLocalAddress());

            notificationsReceived = notificationsReceived && passed;

            if (stage2)
               latch2.countDown();
View Full Code Here

Examples of org.jboss.cache.buddyreplication.BuddyGroup

      public void buddyChanged(BuddyGroupChangedEvent e)
      {
         System.out.println("Received event " + e);
         if (!e.isPre())
         {
            BuddyGroup bg = e.getBuddyGroup();

            boolean passed = bg.getDataOwner().equals(caches[1].getLocalAddress()) &&
                  bg.getBuddies().size() == 1 &&
                  bg.getBuddies().contains(caches[(numActiveCaches == 3) ? 2 : 0].getLocalAddress());

            notificationsReceived = notificationsReceived && passed;

            if (stage2)
               latch2.countDown();
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.