FileDocCategorySizeDatePackage
NotificationEmitterService.javaAPI DocGlassfish v2 API4207Fri May 04 22:30:30 BST 2007com.sun.appserv.management.base

NotificationEmitterService

public interface NotificationEmitterService implements AMX
Enables the emitting of JMX Notifications by any code with access to an MBean implementing this interfaces. Targeted for use by server code which has no corresponding MBean from which to emit a Notification.

since
AppServer 9.0

Fields Summary
public static final String
J2EE_TYPE
The j2eeType as returned by {@link com.sun.appserv.management.base.AMX#getJ2EEType}.
Constructors Summary
Methods Summary
public voidemitNotification(javax.management.Notification notif)
Emit an already-formed Notification. Any entity may invoke this method, even clients, but by convention only server code should do so.

Notifications emitted through this method usually return an Object from getSource() which is not an ObjectName; if an ObjectName is available then the Notification should usually be emitted by that MBean directly. There may be exceptions to this, for example Notifications emitted on behalf of MBeans found in remote server instances. Otherwise, by convention getSource() should return a String representing the source, and the same String should always be used for the same source. Furthermore, the String should never be translated so that the same source will be seen regardless of the language in which the server is running.

Notifications are not checked for duplication; callers should ensure that for any given source (as returned from Notification.getSource()) that the sequence number is monotonically increasing.

Excluding standard JMX Notification types, Notifications emitted by an AMX MBean implementing this interface must follow the AMX conventions:

  • getUserData() must return a java.util.Map (possibly null)
  • the Notification as a whole must be Serializable
  • for instances of this interface which are part of AMX, getType() must return a String defined in an AMX interface.

param
notif
see
com.sun.appserv.management.util.jmx.NotificationBuilder

public intgetListenerCount()

return
number of listeners