javax.slee.management
Class SbbNotification

java.lang.Object
  extended by javax.slee.management.SbbNotification
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable, NotificationSource

public final class SbbNotification
extends java.lang.Object
implements NotificationSource

This class identifies a notification such as an 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.

Since:
SLEE 1.1
See Also:
Serialized Form

Field Summary
static java.lang.String ALARM_NOTIFICATION_TYPE
          The JMX notification type of alarm notifications that are generated in response to an SBB interacting with the AlarmFacility.
static java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 Summary
SbbNotification(ServiceID service, SbbID sbb)
          Create a new SbbNotification object that uniquely identifies an SBB component within a service.
 
Method Summary
 int compareTo(java.lang.Object obj)
          Compare this notification source with the specified object for order.
protected  int compareTo(java.lang.String thisClassName, java.lang.Object that)
           
 boolean equals(java.lang.Object obj)
          Compare this notification source for equality with another object.
 java.lang.String getAlarmNotificationType()
          Get the JMX notification type of alarm notifications generated in response to an SBB interacting with the Alarm Facility.
protected  java.lang.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.
 java.lang.String getTraceNotificationType()
          Get the JMX notification type of trace notifications generated in response to an SBB interacting with the Trace Facility.
 java.lang.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 java.lang.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.
 java.lang.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.
 java.lang.String toString()
          Get a string representation for this notification source.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ALARM_NOTIFICATION_TYPE

public static final java.lang.String ALARM_NOTIFICATION_TYPE
The JMX notification type of alarm notifications that are generated in response to an SBB interacting with the AlarmFacility.

The notification type is equal to the string "javax.slee.management.alarm.sbb".

See Also:
Constant Field Values

TRACE_NOTIFICATION_TYPE

public static final java.lang.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.

The notification type is equal to the string "javax.slee.management.trace.sbb".

See Also:
Constant Field Values

USAGE_NOTIFICATION_TYPE

public static final java.lang.String USAGE_NOTIFICATION_TYPE
The JMX notification type of usage notifications that are generated by a UsageMBean containing an SbbNotification as a notification source.

The notification type is equal to the string "javax.slee.management.usage.sbb".

See Also:
Constant Field Values

SERVICE_NAME_KEY

public static final java.lang.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. This key is equal to the string "serviceName".

Since:
SLEE 1.1
See Also:
UsageMBean.BASE_OBJECT_NAME, UsageMBean.NOTIFICATION_SOURCE_KEY, SERVICE_VENDOR_KEY, SERVICE_VERSION_KEY, SBB_NAME_KEY, SBB_VENDOR_KEY, SBB_VERSION_KEY, Constant Field Values

SERVICE_VENDOR_KEY

public static final java.lang.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. This key is equal to the string "serviceVendor".

Since:
SLEE 1.1
See Also:
UsageMBean.BASE_OBJECT_NAME, UsageMBean.NOTIFICATION_SOURCE_KEY, SERVICE_NAME_KEY, SERVICE_VERSION_KEY, SBB_NAME_KEY, SBB_VENDOR_KEY, SBB_VERSION_KEY, Constant Field Values

SERVICE_VERSION_KEY

public static final java.lang.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. This key is equal to the string "serviceVersion".

Since:
SLEE 1.1
See Also:
UsageMBean.BASE_OBJECT_NAME, UsageMBean.NOTIFICATION_SOURCE_KEY, SERVICE_NAME_KEY, SERVICE_VENDOR_KEY, SBB_NAME_KEY, SBB_VENDOR_KEY, SBB_VERSION_KEY, Constant Field Values

SBB_NAME_KEY

public static final java.lang.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. This key is equal to the string "sbbName".

Since:
SLEE 1.1
See Also:
UsageMBean.BASE_OBJECT_NAME, UsageMBean.NOTIFICATION_SOURCE_KEY, SERVICE_NAME_KEY, SERVICE_VENDOR_KEY, SERVICE_VERSION_KEY, SBB_VENDOR_KEY, SBB_VERSION_KEY, Constant Field Values

SBB_VENDOR_KEY

public static final java.lang.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. This key is equal to the string "sbbVendor".

Since:
SLEE 1.1
See Also:
UsageMBean.BASE_OBJECT_NAME, UsageMBean.NOTIFICATION_SOURCE_KEY, SERVICE_NAME_KEY, SERVICE_VENDOR_KEY, SERVICE_VERSION_KEY, SBB_NAME_KEY, SBB_VERSION_KEY, Constant Field Values

SBB_VERSION_KEY

public static final java.lang.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. This key is equal to the string "sbbVersion".

Since:
SLEE 1.1
See Also:
UsageMBean.BASE_OBJECT_NAME, UsageMBean.NOTIFICATION_SOURCE_KEY, SERVICE_NAME_KEY, SERVICE_VENDOR_KEY, SERVICE_VERSION_KEY, SBB_NAME_KEY, SBB_VENDOR_KEY, Constant Field Values
Constructor Detail

SbbNotification

public SbbNotification(ServiceID service,
                       SbbID sbb)
Create a new SbbNotification object that uniquely identifies an SBB component within a service.

Parameters:
service - the component identifier of the service.
sbb - the component identifier of the SBB.
Throws:
java.lang.NullPointerException - if either argument is null.
Method Detail

getService

public ServiceID getService()
Get the service component identifier of this notification source.

Returns:
the service component identifier.

getSbb

public SbbID getSbb()
Get the SBB component identifier of this notification source.

Returns:
the SBB component identifier.

getAlarmNotificationType

public java.lang.String getAlarmNotificationType()
Get the JMX notification type of alarm notifications generated in response to an SBB interacting with the Alarm Facility.

Specified by:
getAlarmNotificationType in interface NotificationSource
Returns:
the string defined by ALARM_NOTIFICATION_TYPE.

getTraceNotificationType

public java.lang.String getTraceNotificationType()
Get the JMX notification type of trace notifications generated in response to an SBB interacting with the Trace Facility.

Specified by:
getTraceNotificationType in interface NotificationSource
Returns:
the string defined by TRACE_NOTIFICATION_TYPE.

getUsageNotificationType

public java.lang.String getUsageNotificationType()
Get the JMX notification type of usage notifications generated in response to an SBB interacting with its usage parameters.

Specified by:
getUsageNotificationType in interface NotificationSource
Returns:
the string defined by USAGE_NOTIFICATION_TYPE.

getUsageMBeanProperties

public static java.lang.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. This method makes use of the 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:

Parameters:
service - the component identifier of the service.
sbb - the component identifier of the SBB.
Returns:
an Object Name property string that uniquely identifies the specified service and SBB components.
Throws:
java.lang.NullPointerException - if either argument is null.

getUsageMBeanProperties

public java.lang.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.

This method is equivalent to getUsageMBeanProperties(getService(), getSbb()).

Returns:
an Object Name property string that uniquely identifies the service and SBB components of this notification source.

equals

public boolean equals(java.lang.Object obj)
Compare this notification source for equality with another object.

Specified by:
equals in interface NotificationSource
Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare this with.
Returns:
true if obj is an instance of this class and references the same SBB and service component identifiers as this, false otherwise.
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Get a hash code value for this notification source.

Specified by:
hashCode in interface NotificationSource
Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this notification source.
See Also:
Object.hashCode()

toString

public java.lang.String toString()
Get a string representation for this notification source.

Specified by:
toString in interface NotificationSource
Overrides:
toString in class java.lang.Object
Returns:
a string representation for this notification source.
See Also:
Object.toString()

compareTo

public int compareTo(java.lang.Object obj)
Compare this notification source with the specified object for order. Returns a negative integer, zero, or a positive integer if this object is less than, equal to, or greater than the specified object.

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.

Specified by:
compareTo in interface java.lang.Comparable
Specified by:
compareTo in interface NotificationSource
Parameters:
obj - the object to compare this with.
Returns:
a negative integer, zero, or a positive integer if this notification source is considered less than, equal to, or greater than the specified object.
Throws:
java.lang.ClassCastException - if obj does not implement the NotificationSource interface.
See Also:
Comparable.compareTo(Object)

getClassName

protected java.lang.String getClassName()
Get the class name of this notification source. More efficient than getClass().getName().

Returns:
the class name of this notification source.

compareTo

protected final int compareTo(java.lang.String thisClassName,
                              java.lang.Object that)


Copyright © 2008. All Rights Reserved.