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

## javax.management
Interface NotificationBroadcaster

All Known Subinterfaces:
  AccessLogConfig, AdminObjectResourceConfig, AdminServiceConfig, AllDottedNames, AMX, AMXConfig, AMXCounterMonitor, AMXGaugeMonitor, AMXJMXMonitor, AMXStringMonitor, AppClientModule, AppClientModuleConfig, ApplicationMonitor, AuditModuleConfig, AuthRealmConfig, AvailabilityServiceConfig, BeanCacheMonitor, BeanMethodMonitor, BeanMonitor, BeanPoolMonitor, BulkAccess, ClusterConfig, ClusteredServerConfig, ConfigConfig, ConfigDottedNames, ConfigElement, ConnectionManagerMonitor, ConnectionPoolConfig, ConnectionQueueMonitor, ConnectorConnectionPoolConfig, ConnectorConnectionPoolMonitor, ConnectorModuleConfig, ConnectorResourceConfig, ConnectorServiceConfig, Container, CustomResourceConfig, DASConfig, DeployedItemRefConfig, DeploymentMgr, DNSMonitor, DomainConfig, DomainRoot, DottedNames, EJB, EJBContainerAvailabilityConfig, EJBContainerConfig, EJBModule, EJBModuleConfig, EJBModuleMonitor, EJBTimerServiceConfig, EntityBean, EntityBeanMonitor, FileCacheMonitor, HealthCheckerConfig, HTTPAccessLogConfig, HTTPFileCacheConfig, HTTPListenerConfig, HTTPListenerMonitor, HTTPProtocolConfig, HTTPServiceConfig, HTTPServiceMonitor, HTTPServiceVirtualServerMonitor, IIOPListenerConfig, IIOPServiceConfig, J2EEApplication, J2EEApplicationConfig, J2EECluster, J2EEDeployedObject, J2EEDomain, J2EELogicalServer, J2EEManagedObject, J2EEModule, J2EEResource, J2EEServer, JACCProviderConfig, JavaConfig, JavaMailResource, JCAConnectionFactory, JCAManagedConnectionFactory, JCAResource, JDBCConnectionPoolConfig, JDBCConnectionPoolMonitor, JDBCDataSource, JDBCDriver, JDBCResource, JDBCResourceConfig, JMSHostConfig, JMSResource, JMSResourceConfig, JMSServiceConfig, JMXConnectorConfig, JMXMonitorMgr, JNDIResource, JNDIResourceConfig, JTAResource, JVM, JVMMonitor, KeepAliveConfig, KeepAliveMonitor, LBClusterRefConfig, LBConfig, LifecycleModuleConfig, LogServiceConfig, MailResourceConfig, ManagerPropertiesConfig, MDBContainerConfig, MessageDrivenBean, MessageDrivenBeanMonitor, MessageSecurityConfig, ModelMBean, ModelMBeanNotificationBroadcaster, ModuleConfig, ModuleLogLevelsConfig, ModuleMonitoringLevelsConfig, Monitoring, MonitoringDottedNames, MonitoringRoot, MonitoringServiceConfig, MonitoringStats, NamedConfigElement, NativeWebCoreThreadPoolMonitor, NativeWebCoreVirtualServerRequestMonitor, NodeAgentConfig, NotificationEmitter, NotificationService, NotificationServiceMgr, ORBConfig, PersistenceManagerFactoryResourceConfig, ProfilerConfig, ProviderConfig, QueryMgr, QuorumServiceConfig, RARModuleConfig, RefConfig, RequestPolicyConfig, RequestProcessingConfig, ResourceAdapter, ResourceAdapterConfig, ResourceAdapterModule, ResourceConfig, ResourceRefConfig, ResponsePolicyConfig, RMIIIOPResource, Sample, SecurityServiceConfig, ServerConfig, ServerRefConfig, ServerRootMonitor, Servlet, ServletMonitor, SessionBean, SessionConfig, SessionManagerConfig, SessionPropertiesConfig, SSLConfig, SSLConfigContainer, StandaloneServerConfig, StatefulSessionBean, StatefulSessionBeanMonitor, StatelessSessionBean, StatelessSessionBeanMonitor, StorePropertiesConfig, SystemInfo, SystemPropertiesConfig, ThreadPoolConfig, ThreadPoolMonitor, TransactionServiceConfig, TransactionServiceMonitor, UploadDownloadMgr, URLResource, VirtualServerConfig, WebContainerAvailabilityConfig, WebContainerConfig, WebModule, WebModuleConfig, WebModuleVirtualServerMonitor

All Known Implementing Classes:
  MBeanServerDelegate, NotificationBroadcasterSupport, RequiredModelMBean

public interface NotificationBroadcaster

Interface implemented by an MBean that emits Notifications. It allows a listener to be registered with the MBean as a notification listener.

New code should use the `NotificationEmitter` interface instead.

Method Summary
`void` | `addNotificationListener(NotificationListener listener, NotificationFilter filter, java.lang.Object handback)` Adds a listener to this MBean.
`MBeanNotificationInfo[]` | `getNotificationInfo()` Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.
`void` | `removeNotificationListener(NotificationListener listener)` Removes a listener from this MBean.

Method Detail

### addNotificationListener

    public void addNotificationListener(NotificationListener listener,
                                        NotificationFilter filter,
                                        java.lang.Object handback)
                                 throws java.lang.IllegalArgumentException

  Adds a listener to this MBean.

  Parameters:
    `listener` - The listener object which will handle the notifications emitted by the broadcaster.
    `filter` - The filter object. If filter is null, no filtering will be performed before handling notifications.
    `handback` - An opaque object to be sent back to the listener when a notification is emitted. This object cannot be used by the Notification broadcaster object. It should be resent unchanged with the notification to the listener.
  Throws:
    `java.lang.IllegalArgumentException` - Listener parameter is null.
  See Also:
    `removeNotificationListener(javax.management.NotificationListener)`

### removeNotificationListener

    public void removeNotificationListener(NotificationListener listener)
                                    throws ListenerNotFoundException

  Removes a listener from this MBean. If the listener has been registered with different handback objects or notification filters, all entries corresponding to the listener will be removed.

  Parameters:
    `listener` - A listener that was previously added to this MBean.
  Throws:
    `ListenerNotFoundException` - The listener is not registered with the MBean.
  See Also:
    `addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)`, `NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)`

### getNotificationInfo

    public MBeanNotificationInfo[] getNotificationInfo()

  Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.

  It is not illegal for the MBean to send notifications not described in this array. However, some clients of the MBean server may depend on the array being complete for their correct functioning.

  Returns:
    the array of possible notifications.

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

Submit a bug or feature

Copyright 2003 Sun Microsystems, Inc. All rights reserved.