public final class ResourceAdaptorEntityNotification extends Object implements NotificationSource
alarm
or
trace
notification as being generated in response to
some action performed by a resource adaptor entity. For example, if a resource
adaptor entity raises an alarm using the alarm facility
, an alarm notification will be generated containing a
ResourceAdaptorEntityNotification
object that identifies the resource
adaptor entity 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 a resource adaptor entity interacting with the
AlarmFacility . |
static String |
RESOURCE_ADAPTOR_ENTITY_NAME_KEY
The JMX Object Name property key that identifies the name of the resource adaptor
entity 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 a resource adaptor entity interacting with a
Tracer
object. |
static String |
USAGE_NOTIFICATION_TYPE
The JMX notification type of usage notifications that are generated by a
UsageMBean containing a ResourceAdaptorEntityNotification
as a notification source. |
Constructor and Description |
---|
ResourceAdaptorEntityNotification(String entityName)
Create a new
ResourceAdaptorEntityNotification object that uniquely
identifies a resource adaptor entity. |
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 resource adaptor entity interacting with the Alarm Facility.
|
protected String |
getClassName()
Get the class name of this notification source.
|
String |
getEntityName()
Get the name of the resource adaptor entity of this notification source.
|
String |
getTraceNotificationType()
Get the JMX notification type of trace notifications generated in response
to a resource adaptor entity interacting with the Trace Facility.
|
String |
getUsageMBeanProperties()
Get a JMX Object Name property string that uniquely identifies the resource
adaptor entity of this notification source, suitable for inclusion in the Object Name
of a Usage MBean.
|
static String |
getUsageMBeanProperties(String entityName)
Get a JMX Object Name property string that uniquely identifies the specified
resource adaptor entity, 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 resource adaptor entity 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.raentity".
public static final String TRACE_NOTIFICATION_TYPE
Tracer
object.
The notification type is equal to the string "javax.slee.management.trace.raentity".
public static final String USAGE_NOTIFICATION_TYPE
UsageMBean
containing a ResourceAdaptorEntityNotification
as a notification source.
The notification type is equal to the string "javax.slee.management.usage.raentity".
public static final String RESOURCE_ADAPTOR_ENTITY_NAME_KEY
UsageMBean.NOTIFICATION_SOURCE_KEY
property has a value equal to USAGE_NOTIFICATION_TYPE
. This key is
equal to the string "raEntityName".UsageMBean.BASE_OBJECT_NAME
,
UsageMBean.NOTIFICATION_SOURCE_KEY
,
Constant Field Valuespublic ResourceAdaptorEntityNotification(String entityName)
ResourceAdaptorEntityNotification
object that uniquely
identifies a resource adaptor entity.entityName
- the name of the resource adaptor entity.NullPointerException
- if entityName
is null
.public String getEntityName()
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(String entityName)
ObjectName.quote(java.lang.String)
method
to ensure that the resource adaptor entity 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
+ "=" + ResourceAdaptorEntityNotification.USAGE_NOTIFICATION_TYPE
+ "," +
ResourceAdaptorEntityNotification.getUsageMBeanProperties(entityName)
);
entityName
- the name of the resource adaptor entity.NullPointerException
- if entityName
is null
.public String getUsageMBeanProperties()
This method is equivalent to getUsageMBeanProperties(getEntityName())
.
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
contains the same resource adaptor entity name 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 a ResourceAdaptorEntityNotification
,
order is determined by comparing the encapsulated resource adaptor entity
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 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()
.