Set<Class<? extends ServerNotificationListener>> disabledInterfaces,
Set<Class<? extends ServerNotification>> disabledEvents)
{
for (ListenerSubscriptionPair pair : listenerSubscriptionPairs)
{
ServerNotificationListener listener = pair.getListener();
for (Class<? extends ServerNotificationListener> iface : interfaceToEvents.keySet())
{
if (notASubclassOfAnyClassInSet(disabledInterfaces, iface))
{
if (iface.isAssignableFrom(listener.getClass()))
{
Set<Class<? extends ServerNotification>> events = interfaceToEvents.get(iface);
for (Class<? extends ServerNotification> event : events)
{
if (notASubclassOfAnyClassInSet(disabledEvents, event))