Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.mx.notification
Class MBeanServerListenerRegistry

    java.lang.Object
      org.jboss.mx.notification.MBeanServerListenerRegistry

public class MBeanServerListenerRegistry
extends Object

A notification listener registry per ObjectName.

Version:
  $Revision: 1.4 $

  Revisions:

  20030806 Juha Lindfors:

  - Added removeAll()
Author:
  Adrian Brock., Juha Lindfors

Constructor Summary
`MBeanServerListenerRegistry()` Create a notification listener registry

Method Summary
`void` | `add(ObjectName name, NotificationBroadcaster broadcaster, NotificationListener listener, NotificationFilter filter, Object handback)` Adds a listener to the mbean
`void` | `remove(ObjectName name)` Removes all registrations for an mbean broadcaster.
`void` | `remove(ObjectName name, NotificationListener listener)` Removes all registrations for a listener.
`void` | `remove(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback)` Removes only the registrations for a listener that match the filter and handback.
`void` | `removeAll()` Clears all listener registries from this registry.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MBeanServerListenerRegistry

    public MBeanServerListenerRegistry()

  Create a notification listener registry

Method Detail

### add

    public void add(ObjectName name,
                    NotificationBroadcaster broadcaster,
                    NotificationListener listener,
                    NotificationFilter filter,
                    Object handback)

  Adds a listener to the mbean

  Parameters:
    `name` - the object name
    `broadcaster` - the broadcaster
    `listener` - the listener to register
    `filter` - filters the notifications in the broadcaster, can be null
    `handback` - the object to include in the notification, can be null
  Throws:
    `IllegalArgumentException` - for a null object name or listener

### remove

    public void remove(ObjectName name)

  Removes all registrations for an mbean broadcaster.

  Parameters:
    `name` - the object name
  Throws:
    `IllegalArgumentException` - for a null object name

### remove

    public void remove(ObjectName name,
                       NotificationListener listener)
                throws ListenerNotFoundException

  Removes all registrations for a listener.

  Parameters:
    `name` - the object name
    `listener` - the listener to remove
  Throws:
    `ListenerNotFoundException` - when the listener is not registered
    `IllegalArgumentException` - for a null object name

### remove

    public void remove(ObjectName name,
                       NotificationListener listener,
                       NotificationFilter filter,
                       Object handback)
                throws ListenerNotFoundException

  Removes only the registrations for a listener that match the filter and handback.

  Parameters:
    `name` - the object name
    `listener` - the listener to remove
    `filter` - the filter of the registration to remove
    `handback` - the handback object of the registration to remove
  Throws:
    `ListenerNotFoundException` - when the listener is not registered
    `IllegalArgumentException` - for a null object name

### removeAll

    public void removeAll()

  Clears all listener registries from this registry.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.