Java EE 5 SDK

com.sun.appserv.management.base
Interface NotificationEmitterService

All Superinterfaces:
AMX, AMXMBeanLogging, NotificationBroadcaster, NotificationEmitter

public interface NotificationEmitterService
extends 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

Field Summary
static String J2EE_TYPE
          The j2eeType as returned by AMX.getJ2EEType().
 
Fields inherited from interface com.sun.appserv.management.base.AMX
FULL_TYPE_DELIM, GROUP_CONFIGURATION, GROUP_JSR77, GROUP_MONITORING, GROUP_OTHER, GROUP_UTILITY, J2EE_TYPE_KEY, JMX_DOMAIN, NAME_KEY, NO_NAME, NOTIFICATION_PREFIX, NULL_NAME
 
Method Summary
 void emitNotification(Notification notif)
          Emit an already-formed Notification.
 int getListenerCount()
           
 
Methods inherited from interface com.sun.appserv.management.base.AMX
getContainer, getDomainRoot, getFullType, getGroup, getJ2EEType, getName, isDAS
 
Methods inherited from interface javax.management.NotificationEmitter
removeNotificationListener
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 
Methods inherited from interface com.sun.appserv.management.base.AMXMBeanLogging
getMBeanLoggerName, getMBeanLogLevel, setMBeanLogLevel
 

Field Detail

J2EE_TYPE

static final String J2EE_TYPE
The j2eeType as returned by AMX.getJ2EEType().

See Also:
Constant Field Values
Method Detail

emitNotification

void emitNotification(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:

Parameters:
notif -
See Also:
NotificationBuilder

getListenerCount

int getListenerCount()
Returns:
number of listeners

Java EE 5 SDK

Submit a bug or feature

Copyright 2006 Sun Microsystems, Inc. All rights reserved.