public final class SbbNotification extends Object implements NotificationSource
alarm
or
trace
notification as being generated in response to
some action performed by an SBB. For example, if an SBB raises an alarm using the
alarm facility
, an alarm notification
will be generated containing an SbbNotification
object that identifies
the SBB that raised the alarm.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 SBB interacting with the
AlarmFacility . |
static String |
SBB_NAME_KEY
The JMX Object Name property key that identifies the name of the SBB in a
Usage MBean whose
UsageMBean.NOTIFICATION_SOURCE_KEY
property has a value equal to USAGE_NOTIFICATION_TYPE . |
static String |
SBB_VENDOR_KEY
The JMX Object Name property key that identifies the vendor of the SBB in a
Usage MBean whose
UsageMBean.NOTIFICATION_SOURCE_KEY
property has a value equal to USAGE_NOTIFICATION_TYPE . |
static String |
SBB_VERSION_KEY
The JMX Object Name property key that identifies the version of the SBB in a
Usage MBean whose
UsageMBean.NOTIFICATION_SOURCE_KEY
property has a value equal to USAGE_NOTIFICATION_TYPE . |
static String |
SERVICE_NAME_KEY
The JMX Object Name property key that identifies the name of the service in a
Usage MBean whose
UsageMBean.NOTIFICATION_SOURCE_KEY
property has a value equal to USAGE_NOTIFICATION_TYPE . |
static String |
SERVICE_VENDOR_KEY
The JMX Object Name property key that identifies the vendor of the service in a
Usage MBean whose
UsageMBean.NOTIFICATION_SOURCE_KEY
property has a value equal to USAGE_NOTIFICATION_TYPE . |
static String |
SERVICE_VERSION_KEY
The JMX Object Name property key that identifies the version of the service 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 SBB interacting with the Trace Facility via a
Tracer
object. |
static String |
USAGE_NOTIFICATION_TYPE
The JMX notification type of usage notifications that are generated by a
UsageMBean containing an SbbNotification as
a notification source. |
Constructor and Description |
---|
SbbNotification(ServiceID service,
SbbID sbb)
Create a new
SbbNotification object that uniquely identifies an SBB
component within a service. |
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 an SBB interacting with the Alarm Facility.
|
protected String |
getClassName()
Get the class name of this notification source.
|
SbbID |
getSbb()
Get the SBB component identifier of this notification source.
|
ServiceID |
getService()
Get the service component identifier of this notification source.
|
String |
getTraceNotificationType()
Get the JMX notification type of trace notifications generated in response
to an SBB interacting with the Trace Facility.
|
String |
getUsageMBeanProperties()
Get a JMX Object Name property string that uniquely identifies the service
and SBB of this notification source, suitable for inclusion in the Object Name
of a Usage MBean.
|
static String |
getUsageMBeanProperties(ServiceID service,
SbbID sbb)
Get a JMX Object Name property string that uniquely identifies the specified
service and SBB, 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 an SBB 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
.
The notification type is equal to the string "javax.slee.management.alarm.sbb".
public static final String TRACE_NOTIFICATION_TYPE
Tracer
object.
The notification type is equal to the string "javax.slee.management.trace.sbb".
public static final String USAGE_NOTIFICATION_TYPE
UsageMBean
containing an SbbNotification
as
a notification source.
The notification type is equal to the string "javax.slee.management.usage.sbb".
public static final String SERVICE_NAME_KEY
UsageMBean.NOTIFICATION_SOURCE_KEY
property has a value equal to USAGE_NOTIFICATION_TYPE
. This key is
equal to the string "serviceName".public static final String SERVICE_VENDOR_KEY
UsageMBean.NOTIFICATION_SOURCE_KEY
property has a value equal to USAGE_NOTIFICATION_TYPE
. This key is
equal to the string "serviceVendor".public static final String SERVICE_VERSION_KEY
UsageMBean.NOTIFICATION_SOURCE_KEY
property has a value equal to USAGE_NOTIFICATION_TYPE
. This key is
equal to the string "serviceVersion".public static final String SBB_NAME_KEY
UsageMBean.NOTIFICATION_SOURCE_KEY
property has a value equal to USAGE_NOTIFICATION_TYPE
. This key is
equal to the string "sbbName".public static final String SBB_VENDOR_KEY
UsageMBean.NOTIFICATION_SOURCE_KEY
property has a value equal to USAGE_NOTIFICATION_TYPE
. This key is
equal to the string "sbbVendor".public static final String SBB_VERSION_KEY
UsageMBean.NOTIFICATION_SOURCE_KEY
property has a value equal to USAGE_NOTIFICATION_TYPE
. This key is
equal to the string "sbbVersion".public SbbNotification(ServiceID service, SbbID sbb)
SbbNotification
object that uniquely identifies an SBB
component within a service.service
- the component identifier of the service.sbb
- the component identifier of the SBB.NullPointerException
- if either argument is null
.public ServiceID getService()
public SbbID getSbb()
public String getAlarmNotificationType()
getAlarmNotificationType
in interface NotificationSource
ALARM_NOTIFICATION_TYPE
.public String getTraceNotificationType()
getTraceNotificationType
in interface NotificationSource
TRACE_NOTIFICATION_TYPE
.public String getUsageNotificationType()
getUsageNotificationType
in interface NotificationSource
USAGE_NOTIFICATION_TYPE
.public static String getUsageMBeanProperties(ServiceID service, SbbID sbb)
ObjectName.quote(java.lang.String)
method to ensure
that the component identifier attributes are 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
+ "=" + SbbNotification.USAGE_NOTIFICATION_TYPE
+ "," +
SbbNotification.getUsageMBeanProperties(service, sbb)
);
service
- the component identifier of the service.sbb
- the component identifier of the SBB.NullPointerException
- if either argument is null
.public String getUsageMBeanProperties()
This method is equivalent to getUsageMBeanProperties(getService(), getSbb())
.
public boolean equals(Object obj)
equals
in interface NotificationSource
equals
in class Object
obj
- the object to compare this with.true
if obj
is an instance of this class and
references the same SBB and service component identifiers as this,
false
otherwise.Object.equals(Object)
public int hashCode()
hashCode
in interface NotificationSource
hashCode
in class Object
Object.hashCode()
public String toString()
toString
in interface NotificationSource
toString
in class Object
Object.toString()
public int compareTo(Object obj)
If obj
is an SbbNotification
, order is determined
by comparing first the encapsulated service component identifier and then,
if the service component identifiers are equal, the encapsulated SBB
component identifier. 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 Comparable
compareTo
in interface NotificationSource
obj
- the object to compare this with.ClassCastException
- if obj
does not implement the
NotificationSource
interface.Comparable.compareTo(Object)
protected String getClassName()
getClass().getName()
.