Example usage for javax.management ListenerNotFoundException ListenerNotFoundException

List of usage examples for javax.management ListenerNotFoundException ListenerNotFoundException

Introduction

In this page you can find the example usage for javax.management ListenerNotFoundException ListenerNotFoundException.

Prototype

public ListenerNotFoundException() 

Source Link

Document

Default constructor.

Usage

From source file:org.cipango.callflow.JmxMessageLog.java

public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException {
    synchronized (_listeners) {
        Iterator<ListenerInfo> it = _listeners.iterator();
        while (it.hasNext()) {
            JmxMessageLog.ListenerInfo info = it.next();
            if (info.listener.equals(listener)) {
                it.remove();//  w w w .  ja v  a2s  .  c o m
                return;
            }
        }
    }
    throw new ListenerNotFoundException();
}

From source file:org.cipango.callflow.JmxMessageLog.java

public void removeNotificationListener(NotificationListener listener, NotificationFilter filter,
        Object handback) throws ListenerNotFoundException {
    synchronized (_listeners) {
        Iterator<ListenerInfo> it = _listeners.iterator();
        while (it.hasNext()) {
            JmxMessageLog.ListenerInfo info = it.next();
            if (info.listener.equals(listener) && info.filter == filter && info.handback == handback) {
                it.remove();/*  w  ww.ja  v  a2s . co  m*/
                return;
            }
        }
    }
    throw new ListenerNotFoundException();
}