public static void contactAdded(Roster roster, RosterItem item) {
        if (!listeners.isEmpty()) {
            for (RosterEventListener listener : listeners) {
                try {
                    listener.contactAdded(roster, item);  
                } catch (Exception e) {
                    Log.warn("An exception occurred while dispatching a 'contactAdded' event!", e);
                }
            }
        }
    }
Notifies the listeners that a contact has been added to a roster.

@param roster the roster that was updated.
@param item   the new roster item.
xmppserver/src/main/java/org/jivesoftware/openfire/roster/RosterEventDispatcher.java