public Registrar registrar() {
        return new AbstractRegistrar() {

            public void listen(Object emitter, Object type, EventListener<?,?,?> listener) {
                entries.add(createEntry(emitter, type, listener));
            }

            public void mute(Object listener) {
                ListenerEntry e;
                final SimpleIterator<ListenerEntry> iter = entries.iterator();
                while ((e = iter.next()) != null) {
                    final EventListener l = e.getHeader().listenerProvider.get();
                    if (l != null && matchListener(l, listener)) {
                        queue.remove(e);
                        iter.remove();
                    }
                }
            }

            public void cleanup() {
                ListenerEntry e;
                final SimpleIterator<ListenerEntry> iter = entries.iterator();
                while ((e = iter.next()) != null) {
                    queue.remove(e);
                }
                entries.clear();
            }

            public boolean isClean() {
                return entries.isEmpty();
            }

            private WeakQueue<ListenerEntry> entries = new WeakQueue<ListenerEntry>();
        };
    }