public final class SubsystemNotification extends Object implements NotificationSource
alarm or
trace notification as being generated from some internal
subsystem in the SLEE.| Modifier and Type | Field and Description |
|---|---|
static String |
ALARM_NOTIFICATION_TYPE
The JMX notification type of alarm notifications that are generated in response
to an internal component or subsystem of the SLEE interacting with the
AlarmFacility (or a similar internal interface). |
static String |
SUBSYSTEM_NAME_KEY
The JMX Object Name property key that identifies the name of the internal subsystem
in a Usage MBean whose
UsageMBean.NOTIFICATION_SOURCE_KEY
property has a value equal to USAGE_NOTIFICATION_TYPE. |
static String |
TRACE_NOTIFICATION_TYPE
The JMX notification type of trace notifications that are generated in response
to an internal component or subsystem of the SLEE interacting with a
Tracer object (or a similar internal interface). |
static String |
USAGE_NOTIFICATION_TYPE
The JMX notification type of usage notifications that are generated by a
UsageMBean containing a SubsystemNotification
as a notification source. |
| Constructor and Description |
|---|
SubsystemNotification(String subsystemName)
Create a new
SubsystemNotification object that uniquely identifies an
internal component or subsystem of the SLEE. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object obj)
Compare this notification source with the specified object for order.
|
protected int |
compareTo(String thisClassName,
Object that) |
boolean |
equals(Object obj)
Compare this notification source for equality with another object.
|
String |
getAlarmNotificationType()
Get the JMX notification type of alarm notifications generated in response
to a SLEE internal component or subsystem interacting with the Alarm Facility.
|
protected String |
getClassName()
Get the class name of this notification source.
|
String |
getSubsystemName()
Get the name of the internal component or subsystem of the SLEE identified by this
notification source.
|
String |
getTraceNotificationType()
Get the JMX notification type of trace notifications generated in response
to a SLEE internal component or subsystem interacting with the Trace Facility.
|
String |
getUsageMBeanProperties()
Get a JMX Object Name property string that uniquely identifies the SLEE internal
component or subsystem of this notification source, suitable for inclusion in
the Object Name of a Usage MBean.
|
static String |
getUsageMBeanProperties(String subsystemName)
Get a JMX Object Name property string that uniquely identifies the specified SLEE
internal component or subsystem, suitable for inclusion in the Object Name of a Usage
MBean.
|
String |
getUsageNotificationType()
Get the JMX notification type of usage notifications generated in response
to a SLEE internal component or subsystem interacting with its usage parameters.
|
int |
hashCode()
Get a hash code value for this notification source.
|
String |
toString()
Get a string representation for this notification source.
|
public static final String ALARM_NOTIFICATION_TYPE
AlarmFacility (or a similar internal interface).
The notification type is equal to the string "javax.slee.management.alarm.subsystem".
public static final String TRACE_NOTIFICATION_TYPE
Tracer object (or a similar internal interface).
The notification type is equal to the string "javax.slee.management.trace.subsystem".
public static final String USAGE_NOTIFICATION_TYPE
UsageMBean containing a SubsystemNotification
as a notification source.
The notification type is equal to the string "javax.slee.management.usage.subsystem".
public static final String SUBSYSTEM_NAME_KEY
UsageMBean.NOTIFICATION_SOURCE_KEY
property has a value equal to USAGE_NOTIFICATION_TYPE. This key is
equal to the string "subsystemName".UsageMBean.BASE_OBJECT_NAME,
UsageMBean.NOTIFICATION_SOURCE_KEY,
Constant Field Valuespublic SubsystemNotification(String subsystemName)
SubsystemNotification object that uniquely identifies an
internal component or subsystem of the SLEE.subsystemName - the name of the SLEE internal component or subsystem. Subsystem
names may be any vendor-defined string.NullPointerException - if subsystemName is null.public String getSubsystemName()
public String getAlarmNotificationType()
getAlarmNotificationType in interface NotificationSourceALARM_NOTIFICATION_TYPE.public String getTraceNotificationType()
getTraceNotificationType in interface NotificationSourceTRACE_NOTIFICATION_TYPE.public String getUsageNotificationType()
getUsageNotificationType in interface NotificationSourceUSAGE_NOTIFICATION_TYPE.public static String getUsageMBeanProperties(String subsystemName)
ObjectName.quote(java.lang.String)
method to ensure that the name is valid for inclusion as property values in an Object
Name.
This method can be used as follows to manually construct a complete Object Name
for a Usage MBean:
ObjectName name = new ObjectName(
UsageMBean.BASE_OBJECT_NAME + "," +
UsageMBean.USAGE_PARAMETER_SET_NAME_KEY + "=" + ObjectName.quote(paramSetName) + "," // optional
UsageMBean.NOTIFICATION_SOURCE_KEY + "=" + SubsystemNotification.USAGE_NOTIFICATION_TYPE + "," +
SubsystemNotification.getUsageMBeanProperties(subsystemName)
);
subsystemName - the name of the SLEE internal component or subsystem.NullPointerException - if subsystem is null.public String getUsageMBeanProperties()
This method is equivalent to getUsageMBeanProperties(getSubsystemName()).
public boolean equals(Object obj)
equals in interface NotificationSourceequals in class Objectobj - the object to compare this with.true if obj is an instance of this class and
contains the subsystem name as this, false otherwise.Object.equals(Object)public int hashCode()
hashCode in interface NotificationSourcehashCode in class ObjectObject.hashCode()public String toString()
toString in interface NotificationSourcetoString in class ObjectObject.toString()public int compareTo(Object obj)
If obj is a SubsystemNotification, order is
determined by comparing the encapsulated subsystem name. Otherwise, if
obj is a NotificationSource, ordering is determined
by comparing the class name of this class with the class name of obj.
compareTo in interface ComparablecompareTo in interface NotificationSourceobj - the object to compare this with.ClassCastException - if obj does not implement the
NotificationSource interface.Comparable.compareTo(Object)protected String getClassName()
getClass().getName().